Viewing File: /home/quiczmwg/bitmaven.org/depositt.php

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// Start the session
session_start();

// Check if the 'userid' session is set
if (!isset($_SESSION['userid'])) {
    echo "Session 'userid' not set. Redirecting to login.";
    header("Location: ./login.php");
    exit();
}

// Include database connection and other necessary files
require_once('_db.php');

// Set the user ID from the session variable
$userid = $_SESSION['userid'];

// Fetch user information from the database based on userid
$sqlUser = "SELECT userid, full_name, account_balance FROM admin_login WHERE userid = ?";
if ($stmt = $conn->prepare($sqlUser)) {
    $stmt->bind_param("s", $userid); // Use "s" for string type
    if ($stmt->execute()) {
        $stmt->bind_result($userid, $full_name, $account_balance);
        $stmt->fetch();
        $stmt->close();
    } else {
        echo "Error executing user query: " . $stmt->error;
    }
} else {
    echo "Error preparing user query: " . $conn->error;
}
?>
<!DOCTYPE html>
<html lang="zxx">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=1200px">
    <link href="assets/css/font-awesome-all.css" rel="stylesheet">
    <link href="assets/css/flaticon.css" rel="stylesheet">
    <link href="assets/css/owl.css" rel="stylesheet">
    <link href="assets/css/bootstrap.css" rel="stylesheet">
    <link href="assets/css/jquery.fancybox.min.css" rel="stylesheet">
    <link href="assets/css/animate.css" rel="stylesheet">
    <link href="assets/css/color.css" rel="stylesheet">
    <link href="assets/css/rtl.css" rel="stylesheet">
    <link href="assets/css/style.css" rel="stylesheet">
    <link href="assets/css/responsive.css" rel="stylesheet">
    <link rel="stylesheet" href="users/assets/css/bootstrap.min.css">

    <link rel="stylesheet" href="users/assets/css/boxicons.min.css">

    <link rel="stylesheet" href="users/assets/css/meanmenu.css">

    <link rel="stylesheet" href="users/assets/css/animate.min.css">

    <link rel="stylesheet" href="users/assets/css/owl.carousel.min.css">
    <link rel="stylesheet" href="users/assets/css/owl.theme.default.min.css">

    <link rel="stylesheet" href="users/assets/fonts/flaticon.css">

    <link rel="stylesheet" href="users/assets/css/modal-video.min.css">

    <link rel="stylesheet" href="users/assets/css/odometer.min.css">

    <link rel="stylesheet" href="users/assets/css/style.css">

    <link rel="stylesheet" href="users/assets/css/responsive.css">
    <title>wealthwisenetwork.org</title>
    <link rel="icon" type="image/png" href="users/assets/img/favicon.png">
    <style>
        th {
            background: #ff6a40 !important;
            color: #fff;
        }
    </style>
</head>
<style>
    .container {
        display: flex;
        justify-content: space-between;
    }

    .work-item {
        border: 1px solid #ddd;
        border-radius: 10px;
        overflow: hidden;
    }

    .box-header {
        text-align: center;
        padding: 20px;
        background-color: transparent;
        /* No background color by default */
    }

    .account-box-header,
    .profit-box-header,
    .withdrawal-box-header {
        background-color: #001f3d;
        /* Navy blue background for image part */
        border-radius: 10px 10px 0 0;
    }

    .box-content {
        padding: 20px;
        text-align: center;
    }

    .box-content h4 {
        margin-bottom: 10px;
    }

    .box-content p {
        font-size: 1.2em;
    }
</style>



<style>
    #google_translate_element {

        color: transparent;
    }

    #google_translate_element a {

        display: none;
    }

    select.google_translate_element {

        color: black;
    }

    div.goog-te-gadget {

        color: transparent;
    }

    div.goog-te-gadget {
        display: table-caption;
        color: transparent !important;
    }

    .goog-te-gadget .goog-te-combo {
        padding: 11px 10px;
        font-size: 15px;
        font-weight: 500;
        background: #f8952c;
        border: 1px solid #f8952c;
        color: #fff !important;
        cursor: pointer;
        outline: none;
        font-family: 'Poppins', sans-serif;
        border-radius: 5px;
        margin: 0;
    }
</style>


<!-- page wrapper -->

<body class="boxed_wrapper ltr">




    <!-- main header -->
    <header class="main-header style-one style-six">
        <div class="header-top">
            <div class="auto-container">
                <div class="top-inner clearfix">
                    <ul class="info top-left pull-left">
                        <li><i class="fas fa-map-marker-alt"></i>26 Scrutton Street, London, England, EC2A 4RJ</li>

                    </ul>
                    <div class="top-right pull-right">
                        <ul class="social-links clearfix">
                            <li><a href="#"><i class="fab fa-facebook-f"></i></a></li>
                            <li><a href="#"><i class="fab fa-google-plus-g"></i></a></li>
                            <li><a href="#"><i class="fab fa-twitter"></i></a></li>
                            <li><a href="#"><i class="fab fa-linkedin-in"></i></a></li>
                            <li><a href="#"><i class="fab fa-instagram"></i></a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="header-lower">
            <div class="auto-container">
                <div class="outer-box clearfix">
                    <div class="logo-box pull-left">
                        <figure class="logo">
                            <a href="index.php"><img src="images/wealthwise.png" alt="" width="200px"></a>
                        </figure>
                    </div>
                    <div class="menu-area pull-right">
                        <!--Mobile Navigation Toggler-->
                        <div class="mobile-nav-toggler">
                            <i class="icon-bar"></i>
                            <i class="icon-bar"></i>
                            <i class="icon-bar"></i>
                        </div>
                        <nav class="main-menu navbar-expand-md navbar-light">
                            <div class="collapse navbar-collapse show clearfix" id="navbarSupportedContent">
                                <ul class="navigation clearfix">
                                    <li><a href="index.php">HOME</a></li>
                                    <li><a href="about.php">ABOUT</a></li>
                                    <li><a href="faq.php">FAQ</a></li>
                                    <li><a href="team.php">TEAM</a></li>
                                    <li><a href="contact.php">CONTACT</a></li>
                                    <!-- Conditional rendering -->
                                    <?php if (isset($_SESSION['userid'])) : ?>
                                        <li><a href="dashboard.php">DASHBOARD</a></li>
                                        <li><a href="logout.php">LOGOUT</a></li>
                                    <?php else : ?>
                                        <li><a href="register.php">SIGNUP</a></li>
                                        <li><a href="login.php">LOGIN</a></li>
                                    <?php endif; ?>
                                </ul>
                            </div>
                        </nav>
                        <div class="menu-right-content clearfix">
                            <div class="btn-box">
                                <a href="https://t.me/Loreengilbert" class="theme-btn style-two">Telegram Group</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!--sticky Header-->
        <div class="sticky-header">
            <div class="auto-container">
                <div class="outer-box clearfix">
                    <div class="logo-box pull-left">
                        <figure class="logo"><a href="index.php"><img src="images/wealthwise.png" alt="" width="250px"></a></figure>
                    </div>
                    <div class="menu-area pull-right">
                        <nav class="main-menu clearfix">
                            <!--Keep This Empty / Menu will come through Javascript-->
                        </nav>
                    </div>
                </div>
            </div>
        </div>
    </header>
    <!-- main-header end -->

    <!-- Mobile Menu  -->
    <div class="mobile-menu">
        <div class="menu-backdrop"></div>
        <div class="close-btn"><i class="fas fa-times"></i></div>

        <nav class="menu-box">
            <div class="nav-logo"><a href="index.php"><img src="images/fqmarket.png" alt="" title=""></a></div>
            <div class="menu-outer"><!--Here Menu Will Come Automatically Via Javascript / Same Menu as in Header--></div>
            <div class="contact-info">
                <h4>Contact Info</h4>
                <ul>
                    <li>26 Scrutton Street, London, England, EC2A 4RJ</li>
                    <li><a href="tel:+">+88 Coming Soon</a></li>
                    <li><a href="mailto:Wealthwiseinvestments1@gmail.com">Wealthwiseinvestments1@gmail.com</a></li>
                </ul>
            </div>
            <div class="social-links">
                <ul class="clearfix">
                    <li><a href="#"><span class="fab fa-twitter"></span></a></li>
                    <li><a href="#"><span class="fab fa-facebook-square"></span></a></li>
                    <li><a href="#"><span class="fab fa-pinterest-p"></span></a></li>
                    <li><a href="#"><span class="fab fa-instagram"></span></a></li>
                    <li><a href="#"><span class="fab fa-youtube"></span></a></li>
                </ul>
            </div>
        </nav>
    </div><!-- End Mobile Menu -->
    <!--Page Title-->
    <section class="page-title centred" style="background-image: url(assets/images/background/page-title-5.jpg);">
        <div class="auto-container">
            <div class="content-box clearfix">

                <h1>Deposit</h1>
                <ul class="bread-crumb clearfix">
                    <li><a href="index.php">Home</a></li>
                    <li>Deposit </li>
                </ul>
            </div>
        </div>
    </section>
    <!--End Page Title-->


    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <div class="blog-details-area ptb-100">
        <div class="container  mt-5">
            <div class="row" style="display: flex; align-items: stretch;">
                <!-- Sidebar Column -->
                <?php include 'sidebar.php' ?>

                <!-- User Data Column -->
                <div class="col-lg-9 mt-3" style="display: flex; flex-direction: column;">
                    <div class="single_blog_header">
                        <div class="single_blog_img1">
                            <?php
                            // Check if the status parameter is present in the URL
                            if (isset($_GET['status'])) {
                                // Check the value of the status parameter
                                $status = $_GET['status'];
                                if ($status === "success") {
                                    // Display success message with green background
                                    echo '<div class="alert alert-success" role="alert" style="background-color: #d4edda; border-color: #c3e6cb; color: #155724;">';
                                    echo 'Success! Your wallet will be credited once admin confirms your payment.';
                                    echo '</div>';
                                } elseif ($status === "error") {
                                    // Display error message
                                    echo '<div class="alert alert-danger" role="alert">';
                                    echo 'Oops! Something went wrong. Please try again later.';
                                    echo '</div>';
                                }
                            }
                            ?>
                            <form action="process_deposit.php" method="post">
                                <input type="hidden" name="userid" value="<?php echo $_SESSION['userid']; ?>">
                                <input type="hidden" name="full_name" value="<?php echo $_SESSION['full_name']; ?>">
                                <input type="hidden" name="_token" value="dVdL4y8WdiIIppS1KnUCTBetx0aKhyZxgG1iGSIq">

                                <div class="row" x-data>
                                    <div class="mb-4 col-md-12">
                                        <h5 class="card-title">Enter Amount</h5>
                                        <input class="form-control" placeholder="Enter Amount" min="5" type="number" name="amount" required>
                                    </div>

                                    <div class="mb-4 col-md-12">
                                        <input type="hidden" name="payment_method" id="paymethod">
                                    </div>

                                    <div class="mt-2 mb-1 col-md-12">
                                        <h5 class="card-title">Choose Payment Method from the list below</h5>
                                    </div>

                                    <div class="mb-4 col-md-12">
                                        <select class="form-control" name="wallet_type" id="wallet_type" onchange="getWalletAddress(this.value)" required>
                                            <option value="">Select Wallet Type</option>
                                            <?php
                                            // Fetch wallet types from the database
                                            $stmt = $conn->prepare("SELECT DISTINCT wallet_type FROM wallet");
                                            $stmt->execute();
                                            $stmt->store_result();
                                            $stmt->bind_result($wallet_type);
                                            while ($stmt->fetch()) {
                                                echo '<option value="' . htmlspecialchars($wallet_type) . '">' . htmlspecialchars($wallet_type) . '</option>';
                                            }
                                            $stmt->close(); // Close the statement after usage
                                            ?>
                                        </select>
                                    </div>

                                    <!-- Wallet address input that can be copied -->
                                    <div id="wallet_address_container" style="margin-top: 15px; display: none;">
                                        <h6 class="capTitleIn">Wallet Address</h6>
                                        <div class="inputLine" style="display: flex; align-items: center;">
                                            <input type="text" class="form-control" name="wallet_address" id="wallet_address" readonly required style="flex: 1; margin-right: 10px;">
                                            <button id="copy_wallet_address" title="Copy to Clipboard" style="background: none; border: none; cursor: pointer;">
                                                <i class="fas fa-copy"></i>
                                            </button>
                                        </div>
                                    </div>

                                    <!-- Payment ID input field -->
                                    <div class="col">
                                        <div class="inputLine">
                                            <label for="payment_id">Transaction ID:</label>
                                            <input type="text" name="payment_id" class="form-control" placeholder="Enter Transaction ID" required />
                                        </div>
                                    </div>

                                    <div class="mt-2 mb-1 col-md-12">
                                        <input type="submit" class="px-5 btn theme-btn style-two btn-lg" value="Save Deposit">
                                    </div>

                                    <input type="hidden" id="lastchosen" value="0">
                                </div>
                            </form>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>



    </div>
    </div>
    </div>

    </div>

    <!-- Include jQuery and FontAwesome for copy icon -->
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">

    <script>
        function getWalletAddress(walletType) {
            // If no wallet type is selected, hide the wallet address container
            if (walletType === "") {
                document.getElementById("wallet_address_container").style.display = "none";
                return;
            }

            // Make an AJAX request to the PHP script to fetch the wallet address
            var xhr = new XMLHttpRequest();
            xhr.open("POST", "get_wallet_address.php", true); // Replace 'get_wallet_address.php' with your actual script
            xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            xhr.onreadystatechange = function() {
                if (xhr.readyState === 4 && xhr.status === 200) {
                    var response = xhr.responseText;

                    // Display the wallet address if found, otherwise show an error
                    if (response !== "Wallet address not found") {
                        document.getElementById("wallet_address").value = response;
                        document.getElementById("wallet_address_container").style.display = "block";
                    } else {
                        alert("Wallet address not found");
                        document.getElementById("wallet_address_container").style.display = "none";
                    }
                }
            };
            xhr.send("wallet_type=" + encodeURIComponent(walletType));
        }
    </script>
    <?php
    include_once("include/footer.php");
    ?>
Back to Directory File Manager
<