<?php 
session_start();
include_once('./_db.php');

// Check if the user is logged in
if (!isset($_SESSION['userid'])) {
    header("Location: ./login.php");
    exit();
}

// Check if product_id is provided
if (isset($_GET['product_id'])) {
    $product_id = $_GET['product_id'];

    // Fetch product data from the database based on the provided product_id
    $query = "SELECT * FROM products WHERE product_id = ?";
    
    if ($stmt = $conn->prepare($query)) {
        $stmt->bind_param("s", $product_id);
        
        if ($stmt->execute()) {
            $result = $stmt->get_result();

            if ($result->num_rows > 0) {
                $row = $result->fetch_assoc();
            } else {
                echo "No product found for the provided product_id.";
                exit();
            }
        } else {
            echo "Error executing the query: " . $stmt->error;
            exit();
        }
    } else {
        echo "Error preparing the query: " . $conn->error;
        exit();
    }
} else {
    echo "No product_id provided in the URL.";
    exit();
}


?>


<!DOCTYPE html>
<html lang="en" data-theme="Theme Type" data-sidebar-behaviour="fixed" data-navigation-color="inverted" data-is-fluid="true">

<meta http-equiv="content-type" content="text/html;charset=UTF-8" />

<head>
    <script type="text/javascript" src="https://js.stripe.com/v3/"></script>
    <meta charset="utf-8">
    <meta name="csrf-token" content="dVdL4y8WdiIIppS1KnUCTBetx0aKhyZxgG1iGSIq">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta content="Webinning" name="author">
    <!-- Theme CSS -->
    <link rel="stylesheet" href="https://extrodigitalpro.com/themes/dashly/assets/css/theme.bundle.css" id="stylesheetLTR">
    <link rel="stylesheet" href="https://extrodigitalpro.com/themes/dashly/assets/css/theme.rtl.bundle.css" id="stylesheetRTL">
    <link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="preload" as="style"
        href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&amp;display=swap">
    <link rel="stylesheet" media="print" onload="this.onload=null;this.removeAttribute('media');"
        href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&amp;display=swap">
    <link rel="stylesheet" href="https://extrodigitalpro.com/themes/dashly/assets/ext/font/bootstrap-icons.css">
    <!-- no-JS fallback -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
    <noscript>
        <link rel="stylesheet"
            href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&amp;display=swap">
    </noscript>

    <script>
        // Add your client ID and secret
        var PAYPAL_CLIENT = 'iidjdjdj';
        var PAYPAL_SECRET = 'jijdjkdkdk';
        // Point your server to the PayPal API
        var PAYPAL_ORDER_API = 'https://api.paypal.com/v2/checkout/orders/';
    </script>
    <script src="https://www.paypal.com/sdk/js?client-id=iidjdjdj"></script>
    <script src="https://extrodigitalpro.com/themes/dashly/assets/ext/dist/sweetalert2.all.min.js"></script>
    <link href="https://extrodigitalpro.com/themes/dashly/assets/ext/dist/sweetalert2.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://extrodigitalpro.com/themes/dashly/assets/ext/libs/toastr.min.css">
    
    <script>
        // Theme switcher
        let themeSwitcher = document.getElementById('themeSwitcher');

        const getPreferredTheme = () => {
            if (localStorage.getItem('theme') != null) {
                return localStorage.getItem('theme');
            }

            return document.documentElement.dataset.theme;
        };

        const setTheme = function(theme) {
            if (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
                document.documentElement.dataset.theme = window.matchMedia('(prefers-color-scheme: dark)').matches ?
                    'dark' : 'light';
            } else {
                document.documentElement.dataset.theme = theme;
            }

            localStorage.setItem('theme', theme);
        };

        const showActiveTheme = theme => {
            const activeBtn = document.querySelector(`[data-theme-value="${theme}"]`);

            document.querySelectorAll('[data-theme-value]').forEach(element => {
                element.classList.remove('active');
            });

            activeBtn && activeBtn.classList.add('active');

            // Set button if demo mode is enabled
            document.querySelectorAll('[data-theme-control="theme"]').forEach(element => {
                if (element.value == theme) {
                    element.checked = true;
                }
            });
        };

        function reloadPage() {
            window.location = window.location.pathname;
        }


        setTheme(getPreferredTheme());

        if (typeof themeSwitcher != 'undefined') {
            window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
                if (localStorage.getItem('theme') != null) {
                    if (localStorage.getItem('theme') == 'auto') {
                        reloadPage();
                    }
                }
            });

            window.addEventListener('load', () => {
                showActiveTheme(getPreferredTheme());

                document.querySelectorAll('[data-theme-value]').forEach(element => {
                    element.addEventListener('click', () => {
                        const theme = element.getAttribute('data-theme-value');

                        localStorage.setItem('theme', theme);
                        reloadPage();
                    })
                })
            });
        }
    </script>
    <!-- Favicon -->
    <link rel="icon" href="https://extrodigitalpro.com/storage/app/public/photos/QU2i9eb3W6MbSPIruj5EP4wvld0n5Z2Q7Yr5i9k6.png" sizes="any">

    <!-- Demo script -->
    <script>
        var themeConfig = {
            theme: JSON.parse('"dark"'),
            isRTL: JSON.parse('false'),
            isFluid: JSON.parse('true'),
            sidebarBehaviour: JSON.parse('"fixed"'),
            navigationColor: JSON.parse('"inverted"')
        };

        var isRTL = localStorage.getItem('isRTL') === 'true',
            isFluid = localStorage.getItem('isFluid') === 'true',
            theme = localStorage.getItem('theme'),
            sidebarSizing = localStorage.getItem('sidebarSizing'),
            linkLTR = document.getElementById('stylesheetLTR'),
            linkRTL = document.getElementById('stylesheetRTL'),
            html = document.documentElement;

        if (isRTL) {
            linkLTR.setAttribute('disabled', '');
            linkRTL.removeAttribute('disabled');
            html.setAttribute('dir', 'rtl');
        } else {
            linkRTL.setAttribute('disabled', '');
            linkLTR.removeAttribute('disabled');
            html.removeAttribute('dir');
        }
    </script>

    <!-- Page Title -->
    <title>Fund your account | ExtrodigitalPro</title>
        <script src="https://extrodigitalpro.com/themes/dashly/assets/ext/dist/alpine.min.js" defer></script>
    <!-- Livewire Styles -->
<style >
    [wire\:loading], [wire\:loading\.delay], [wire\:loading\.inline-block], [wire\:loading\.inline], [wire\:loading\.block], [wire\:loading\.flex], [wire\:loading\.table], [wire\:loading\.grid], [wire\:loading\.inline-flex] {
        display: none;
    }

    [wire\:loading\.delay\.shortest], [wire\:loading\.delay\.shorter], [wire\:loading\.delay\.short], [wire\:loading\.delay\.long], [wire\:loading\.delay\.longer], [wire\:loading\.delay\.longest] {
        display:none;
    }

    [wire\:offline] {
        display: none;
    }

    [wire\:dirty]:not(textarea):not(input):not(select) {
        display: none;
    }

    input:-webkit-autofill, select:-webkit-autofill, textarea:-webkit-autofill {
        animation-duration: 50000s;
        animation-name: livewireautofill;
    }

    @keyframes livewireautofill { from {} }
</style>
</head>

<body>
    
    <script>
        
    </script>
    <!-- THEME CONFIGURATION -->
    <script>
        let themeAttrs = document.documentElement.dataset;

        for (let attr in themeAttrs) {
            if (localStorage.getItem(attr) != null) {
                document.documentElement.dataset[attr] = localStorage.getItem(attr);

                if (theme === 'auto') {
                    document.documentElement.dataset.theme = window.matchMedia('(prefers-color-scheme: dark)').matches ?
                        'dark' : 'light';

                    window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
                        e.matches ? document.documentElement.dataset.theme = 'dark' : document.documentElement
                            .dataset.theme = 'light';
                    });
                }
            }
        }
    </script>
    <!-- NAVIGATION -->
    <nav id="mainNavbar" class="navbar navbar-vertical navbar-expand-lg scrollbar bg-dark navbar-dark">
        <!-- Theme configuration (navbar) -->
        <script>
            let navigationColor = localStorage.getItem('navigationColor'),
                navbar = document.getElementById('mainNavbar');

            if (navigationColor != null && navbar != null) {
                if (navigationColor == 'inverted') {
                    navbar.classList.add('bg-dark', 'navbar-dark');
                    navbar.classList.remove('bg-white', 'navbar-light');
                } else {
                    navbar.classList.add('bg-white', 'navbar-light');
                    navbar.classList.remove('bg-dark', 'navbar-dark');
                }
            }
        </script>
        <div class="container-fluid">
            <!-- Brand -->
            <a class="uk-logo" href="index.php">
                                <!-- <img src="storage/app/public/photos/logo.jpg"  alt=""> -->
                                <img class="in-offset-top-10" src="storage/app/public/photos/logo.jpg" data-src="storage/app/public/photos/logo.jpg" alt="logo" width="125" height="56" data-uk-img="">
                            </a>

            <!-- Navbar toggler -->
            <a href="javascript: void(0);" class="navbar-toggler" data-bs-toggle="collapse"
                data-bs-target="#sidenavCollapse" aria-controls="sidenavCollapse" aria-expanded="false"
                aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </a>
            <!-- Collapse -->
            <div class="collapse navbar-collapse" id="sidenavCollapse">
                <!-- Navigation -->
                <ul class="navbar-nav mb-lg-7">
                    <li class="nav-item">
                        <a class="nav-link" href="dashboard.php">
                            <i class="bi bi-house nav-link-icon fs-3"></i>
                            <span>Dashboards</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link active" href="deposit.php">
                            <i class="bi bi-wallet-fill nav-link-icon fs-3"></i>
                            <span>Deposit</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="withdrawals.php">
                            <i class="bi bi-graph-down nav-link-icon fs-3"></i>
                            <span>Withdraw</span>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="accounthistory.php">
                            <i class="bi bi-clock-history nav-link-icon fs-3"></i>
                            <span>Transaction History</span>
                        </a>
                    </li>
                                            <li class="nav-item dropdown">
                            <a class="nav-link" href="#pagesCollapse" data-bs-toggle="collapse"
                                role="button" aria-expanded="false" aria-controls="pagesCollapse">
                                <i class="bi bi-bounding-box nav-link-icon fs-3"></i>
                                <span>Resources</span>
                            </a>
                            <div class="collapse" id="pagesCollapse">
                                <ul class="nav flex-column">
                                    <li class="nav-item">
                                        <a href="buy-plan.php" class="nav-link">
                                            <span>Market</span>
                                        </a>
                                    </li>
                                    
                                </ul>
                            </div>
                        </li>
                                      
                   
                    
                        

                    <li class="nav-item w-100">
                        <hr>
                    </li>
                    <li class="nav-item">
                        <a href="change-password.php" class="nav-link" class="nav-link">
                            <i class="bi bi-info-circle-fill nav-link-icon fs-3"></i>
                            <span>Change Password</span>
                        </a>
                    </li>
                </ul>
                <!-- End of Navigation -->
                
                    <!-- Info box -->
                    <div class="help-box rounded-3 py-5 px-4 text-center mt-auto d-block">
                        <img src="https://d33wubrfki0l68.cloudfront.net/562db41ab1c8390d2de557ae8ebd99c6add4f80b/2053e/assets/images/illustrations/upgrade-illustration.svg"
                            alt="..." class="img-fluid mb-4" width="160" height="160">
                        <h6>Verify your identity to operate seamlessly.</h6>
                                                    <!-- Button -->
                            <a class="btn w-100 btn-sm btn-primary" href="https://extrodigitalpro.com/dashboard/verify-account">Verify
                                identity</a>
                                            </div>
                
            </div>
            <!-- End of Collapse -->
        </div>



        
    </nav>
    <!-- MAIN CONTENT -->
    <main>
        <!-- HEADER -->
        <header class="container-fluid d-flex py-6 mb-4">
            <!-- Top buttons -->
            <div class="d-flex align-items-center ms-auto me-n1 me-lg-n2">

                <!-- Dropdown -->
                <div class="dropdown" id="themeSwitcher">
                    <a href="javascript: void(0);"
                        class="dropdown-toggle no-arrow d-flex align-items-center justify-content-center bg-white rounded-circle shadow-sm mx-1 mx-lg-2 w-40px h-40px link-secondary"
                        role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
                        data-bs-offset="0,0">
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="18" width="18">
                            <g>
                                <path
                                    d="M12,4.64A7.36,7.36,0,1,0,19.36,12,7.37,7.37,0,0,0,12,4.64Zm0,12.72A5.36,5.36,0,1,1,17.36,12,5.37,5.37,0,0,1,12,17.36Z"
                                    style="fill: currentColor" />
                                <path d="M12,3.47a1,1,0,0,0,1-1V1a1,1,0,0,0-2,0V2.47A1,1,0,0,0,12,3.47Z"
                                    style="fill: currentColor" />
                                <path
                                    d="M4.55,6a1,1,0,0,0,.71.29A1,1,0,0,0,6,6,1,1,0,0,0,6,4.55l-1-1A1,1,0,0,0,3.51,4.93Z"
                                    style="fill: currentColor" />
                                <path d="M2.47,11H1a1,1,0,0,0,0,2H2.47a1,1,0,1,0,0-2Z" style="fill: currentColor" />
                                <path
                                    d="M4.55,18l-1,1a1,1,0,0,0,0,1.42,1,1,0,0,0,.71.29,1,1,0,0,0,.71-.29l1-1A1,1,0,0,0,4.55,18Z"
                                    style="fill: currentColor" />
                                <path d="M12,20.53a1,1,0,0,0-1,1V23a1,1,0,0,0,2,0V21.53A1,1,0,0,0,12,20.53Z"
                                    style="fill: currentColor" />
                                <path
                                    d="M19.45,18A1,1,0,0,0,18,19.45l1,1a1,1,0,0,0,.71.29,1,1,0,0,0,.71-.29,1,1,0,0,0,0-1.42Z"
                                    style="fill: currentColor" />
                                <path d="M23,11H21.53a1,1,0,0,0,0,2H23a1,1,0,0,0,0-2Z" style="fill: currentColor" />
                                <path
                                    d="M18.74,6.26A1,1,0,0,0,19.45,6l1-1a1,1,0,1,0-1.42-1.42l-1,1A1,1,0,0,0,18,6,1,1,0,0,0,18.74,6.26Z"
                                    style="fill: currentColor" />
                            </g>
                        </svg>
                    </a>

                    <ul class="dropdown-menu dropdown-menu-end">
                        <li>
                            <button type="button" class="dropdown-item active" data-theme-value="light">
                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="me-2"
                                    height="18" width="18">
                                    <g>
                                        <path
                                            d="M12,4.64A7.36,7.36,0,1,0,19.36,12,7.37,7.37,0,0,0,12,4.64Zm0,12.72A5.36,5.36,0,1,1,17.36,12,5.37,5.37,0,0,1,12,17.36Z"
                                            style="fill: currentColor" />
                                        <path d="M12,3.47a1,1,0,0,0,1-1V1a1,1,0,0,0-2,0V2.47A1,1,0,0,0,12,3.47Z"
                                            style="fill: currentColor" />
                                        <path
                                            d="M4.55,6a1,1,0,0,0,.71.29A1,1,0,0,0,6,6,1,1,0,0,0,6,4.55l-1-1A1,1,0,0,0,3.51,4.93Z"
                                            style="fill: currentColor" />
                                        <path d="M2.47,11H1a1,1,0,0,0,0,2H2.47a1,1,0,1,0,0-2Z"
                                            style="fill: currentColor" />
                                        <path
                                            d="M4.55,18l-1,1a1,1,0,0,0,0,1.42,1,1,0,0,0,.71.29,1,1,0,0,0,.71-.29l1-1A1,1,0,0,0,4.55,18Z"
                                            style="fill: currentColor" />
                                        <path d="M12,20.53a1,1,0,0,0-1,1V23a1,1,0,0,0,2,0V21.53A1,1,0,0,0,12,20.53Z"
                                            style="fill: currentColor" />
                                        <path
                                            d="M19.45,18A1,1,0,0,0,18,19.45l1,1a1,1,0,0,0,.71.29,1,1,0,0,0,.71-.29,1,1,0,0,0,0-1.42Z"
                                            style="fill: currentColor" />
                                        <path d="M23,11H21.53a1,1,0,0,0,0,2H23a1,1,0,0,0,0-2Z"
                                            style="fill: currentColor" />
                                        <path
                                            d="M18.74,6.26A1,1,0,0,0,19.45,6l1-1a1,1,0,1,0-1.42-1.42l-1,1A1,1,0,0,0,18,6,1,1,0,0,0,18.74,6.26Z"
                                            style="fill: currentColor" />
                                    </g>
                                </svg>
                                Light mode
                            </button>
                        </li>
                        <li>
                            <button type="button" class="dropdown-item" data-theme-value="dark">
                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="me-2"
                                    height="18" width="18">
                                    <path
                                        d="M19.57,23.34a1,1,0,0,0,0-1.9,9.94,9.94,0,0,1,0-18.88,1,1,0,0,0,.68-.94,1,1,0,0,0-.68-.95A11.58,11.58,0,0,0,8.88,2.18,12.33,12.33,0,0,0,3.75,12a12.31,12.31,0,0,0,5.11,9.79A11.49,11.49,0,0,0,15.61,24,12.55,12.55,0,0,0,19.57,23.34ZM10,20.17A10.29,10.29,0,0,1,5.75,12a10.32,10.32,0,0,1,4.3-8.19A9.34,9.34,0,0,1,15.59,2a.17.17,0,0,1,.17.13.18.18,0,0,1-.07.2,11.94,11.94,0,0,0-.18,19.21.25.25,0,0,1-.16.45A9.5,9.5,0,0,1,10,20.17Z"
                                        style="fill: currentColor" />
                                </svg>
                                Dark mode
                            </button>
                        </li>
                        <li>
                            <button type="button" class="dropdown-item" data-theme-value="auto">
                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="me-2"
                                    height="18" width="18">
                                    <path
                                        d="M24,12a1,1,0,0,0-1-1H19.09a.51.51,0,0,1-.49-.4,6.83,6.83,0,0,0-.94-2.28.5.5,0,0,1,.06-.63l2.77-2.76a1,1,0,1,0-1.42-1.42L16.31,6.28a.5.5,0,0,1-.63.06A6.83,6.83,0,0,0,13.4,5.4a.5.5,0,0,1-.4-.49V1a1,1,0,0,0-2,0V4.91a.51.51,0,0,1-.4.49,6.83,6.83,0,0,0-2.28.94.5.5,0,0,1-.63-.06L4.93,3.51A1,1,0,0,0,3.51,4.93L6.28,7.69a.5.5,0,0,1,.06.63A6.83,6.83,0,0,0,5.4,10.6a.5.5,0,0,1-.49.4H1a1,1,0,0,0,0,2H4.91a.51.51,0,0,1,.49.4,6.83,6.83,0,0,0,.94,2.28.5.5,0,0,1-.06.63L3.51,19.07a1,1,0,1,0,1.42,1.42l2.76-2.77a.5.5,0,0,1,.63-.06,6.83,6.83,0,0,0,2.28.94.5.5,0,0,1,.4.49V23a1,1,0,0,0,2,0V19.09a.51.51,0,0,1,.4-.49,6.83,6.83,0,0,0,2.28-.94.5.5,0,0,1,.63.06l2.76,2.77a1,1,0,1,0,1.42-1.42l-2.77-2.76a.5.5,0,0,1-.06-.63,6.83,6.83,0,0,0,.94-2.28.5.5,0,0,1,.49-.4H23A1,1,0,0,0,24,12Zm-8.74,2.5A5.76,5.76,0,0,1,9.5,8.74a5.66,5.66,0,0,1,.16-1.31A.49.49,0,0,1,10,7.07a5.36,5.36,0,0,1,1.8-.31,5.47,5.47,0,0,1,5.46,5.46,5.36,5.36,0,0,1-.31,1.8.49.49,0,0,1-.35.32A5.53,5.53,0,0,1,15.26,14.5Z"
                                        style="fill: currentColor" />
                                </svg>
                                Auto
                            </button>
                        </li>
                    </ul>
                </div>

                <!-- Separator -->
                <div class="vr bg-gray-700 mx-2 mx-lg-3"></div>
                <!-- Button -->
                <a class="d-flex align-items-center justify-content-center bg-white rounded-circle shadow-sm mx-1 mx-lg-2 w-40px h-40px position-relative link-secondary"
                    data-bs-toggle="offcanvas" href="#offcanvasNotifications" role="button"
                    aria-controls="offcanvasNotifications">
                    <svg viewBox="0 0 24 24" height="18" width="18" xmlns="http://www.w3.org/2000/svg">
                        <path d="M10,21.75a2.087,2.087,0,0,0,4.005,0" fill="none" stroke="currentColor"
                            stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" />
                        <path d="M12 3L12 0.75" fill="none" stroke="currentColor" stroke-linecap="round"
                            stroke-linejoin="round" stroke-width="1.5" />
                        <path
                            d="M12,3a7.5,7.5,0,0,1,7.5,7.5c0,7.046,1.5,8.25,1.5,8.25H3s1.5-1.916,1.5-8.25A7.5,7.5,0,0,1,12,3Z"
                            fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
                            stroke-width="1.5" />
                    </svg>
                   
                </a>

                <!-- Notifications offcanvas -->
                <div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasNotifications"
                    aria-labelledby="offcanvasNotificationsLabel">
                    <div class="offcanvas-header px-5">
                        <h3 class="offcanvas-title" id="offcanvasNotificationsLabel">Notifications</h3>
                        <div class="d-flex align-items-start">
                            <!-- Button -->
                            <button type="button" class="btn-close" data-bs-dismiss="offcanvas"
                                aria-label="Close"></button>
                        </div>
                    </div>

                    <div class="offcanvas-body p-0">
                        <div class="list-group list-group-flush">
                           
                        </div>
                    </div>
                </div>
                <!-- Separator -->
                <div class="vr bg-gray-700 mx-2 mx-lg-3"></div>

                <!-- Dropdown -->
                <div class="dropdown">
                    <a href="javascript: void(0);"
                        class="dropdown-toggle no-arrow d-flex align-items-center justify-content-center bg-white rounded-circle shadow-sm mx-1 mx-lg-2 w-40px h-40px"
                        role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-haspopup="true"
                        aria-expanded="false" data-bs-offset="0,0">
                        <div class="avatar avatar-circle avatar-sm avatar-online">
                                <img src="https://png.pngtree.com/png-vector/20220521/ourlarge/pngtree-avatar-profile-icon-png-image_4644647.png"
                                    alt="..." class="avatar-img" width="40" height="40">
                                                    </div>
                    </a>

                    <div class="dropdown-menu">
                        <div class="dropdown-item-text">
                            <div class="d-flex align-items-center">
                                <div class="flex-grow-1 ms-3">
                                    <h4 class="mb-0">Welcome, <?php echo $full_name; ?></h4>
                                    <p class="card-text"><?php echo $email; ?></p>
                                </div>
                            </div>
                        </div>
                        <hr class="dropdown-divider">
                        <!-- Dropdown -->
                        <div class="dropdown dropend">
                            <a class="dropdown-item dropdown-toggle" href="javascript: void(0);" id="statusDropdown"
                                data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="-16,10">
                                Quick links
                            </a>
                            <div class="dropdown-menu dropdown-menu-end navbar-dropdown-menu navbar-dropdown-menu-borderless navbar-dropdown-sub-menu"
                                aria-labelledby="statusDropdown">
                                <a class="dropdown-item" href="deposits.php">
                                    Deposit
                                </a>
                                <a class="dropdown-item" href="withdrawals.php">
                                    Withdrawal request
                                </a>
                            </div>
                        </div>
                        <!-- End Dropdown -->

                    

                        <a class="dropdown-item text-danger" href="logout.php"
                            onclick="event.preventDefault();
                    document.getElementById('logout-form').submit();">Sign
                            out</a>
                        <form id="logout-form" action="logout.php" method="POST"
                            style="display: none;">
                            <input type="hidden" name="_token" value="dVdL4y8WdiIIppS1KnUCTBetx0aKhyZxgG1iGSIq">
                        </form>
                    </div>
                </div>
            </div>
        </header>
        

        <div class="container-fluid mb-5">
                <!-- Page title -->
    <div class="page-title">
        <div class="row justify-content-between align-items-center">
            <div class="mb-3 col-md-6 mb-md-0">
            <h1 class="h2">
        Advertisement Product
    </h1>
            </div>
        </div>
    </div>
    <div>
    </div>
<div>
      <div>
    </div>
       <div>
    </div>
   
                                <section class="elementor-section elementor-top-section elementor-element elementor-section-full_width" data-id="some_id" data-element_type="section">
                                    <div style="height: 140px;"></div>
                                        <div class="container my-5"> <!-- Added container with margin -->
                                        
                                            <div class="row">
                                                        <div class="col-md-8 mx-auto">
                                                            <div class="container">
                                                                <div class="card">
                                                                    <div class="card-header">
                                                                        <h3>Product Details</h3>
                                                                    </div>
                                                                    <div class="card-body">
                                                                        <div class="row">
                                                                            <div class="col-md-6">
                                                                                <img src="uploads/<?php echo $row['image']; ?>" class="img-fluid" alt="">
                                                                            </div>
                                                                            
                                                                            <div class="col-md-6">
                                                                                <h5>Product Name:</h5>
                                                                                <p class=""><?php echo html_entity_decode($row['product_name']); ?></p>
                                                                            
                                                                                <h5>Price:</h5>
                                                                                <p>$<?php echo number_format($row['amount']); ?></p>
                                                                                
                                                                                <h5>Description:</h5>
                                                                                <p><?php echo html_entity_decode($row['description']); ?></p>

                                                                                <!-- Advertise Now Button -->
                                                                                <form action="advertisement_deposit.php?product_id=<?php echo $product_id; ?>" method="POST">
                                                                                    <input type="hidden" name="product_id" value="<?php echo $product_id; ?>">
                                                                                    <input type="hidden" name="advert_amount" value="<?php echo $row['amount'] * 0.1; ?>">
                                                                                    <button type="submit" id="submit-btn" class="chy-pr-btn-1 tx-button mt-4 btn btn-primary fadeInLeft">Advertise now
                                                                                        <span class="icon">
                                                                                            <i aria-hidden="true" class="flaticon-straight-right-arrow"></i>       
                                                                                        </span>
                                                                                    </button>
                                                                                    <!-- <button type="submit" class="btn btn-primary mt-3">Advertise Now</button> -->
                                                                                </form>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                </section>
            </div>

        <!-- Footer -->
        <footer class="mt-auto">
            <div class="container-fluid mt-4 mb-6 text-muted">
                <div class="row justify-content-between">
                    <div class="col">
                        All Rights Reserved &copy; Choicydigitals 2018
                    </div>

                    <div class="col-auto">
                                                    <div id="google_translate_element"></div>
                                            </div>
                </div> <!-- / .row -->
            </div>
        </footer>
    </main> <!-- / main -->

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

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


<script>
    function getWalletAddress(walletType) {
        if (walletType === "") {
            $('#wallet_address_container').hide();
            return;
        }

        $.ajax({
            url: 'get_wallet_address.php',
            type: 'POST',
            data: { wallet_type: walletType },
            success: function(response) {
                $('#wallet_address').val(response);
                $('#wallet_address_container').show();
            },
            error: function() {
                alert("An error occurred while fetching the wallet address.");
            }
        });
    }

    $('#copy_wallet_address').on('click', function(event) {
        event.preventDefault();
        const walletAddress = $('#wallet_address');
        walletAddress.select();
        document.execCommand('copy');
        alert('Wallet address copied to clipboard.');
    });

    function validateForm() {
        const walletAddress = $('#wallet_address').val();
        if (!walletAddress) {
            alert('Error: Wallet address input is empty.');
            return false; // Prevent form submission
        }
        return true; // Allow form submission
    }
</script>

    <script src="https://code.jquery.com/jquery-3.7.0.min.js"
        integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g=" crossorigin="anonymous"></script>
    <script src="https://extrodigitalpro.com/themes/dashly/assets/ext/dist/toastr.min.js"></script>
    


                    <!-- Scripts -->
        <!-- Core JS - includes jquery, bootstrap, popper, in-view and sticky-kit -->
        <script src="https://extrodigitalpro.com/themes/purposeTheme/assets/js/purpose.core.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
        <!-- Bootstrap Notify -->
        <script src="https://extrodigitalpro.com/themes/purposeTheme/assets/libs/bootstrap-notify/bootstrap-notify.min.js "></script>
        <!-- Page JS -->
        <script src="https://extrodigitalpro.com/themes/purposeTheme/assets/libs/progressbar.js/dist/progressbar.min.js"></script>
        <script src="https://extrodigitalpro.com/themes/purposeTheme/assets/libs/apexcharts/dist/apexcharts.min.js"></script>
        <script src="https://extrodigitalpro.com/themes/purposeTheme/assets/libs/moment/min/moment.min.js"></script>
        <script src="https://extrodigitalpro.com/themes/purposeTheme/assets/libs/fullcalendar/dist/fullcalendar.min.js"></script>
        <script src="https://extrodigitalpro.com/themes/purposeTheme/assets/libs/sweetalert/sweetalert.min.js "></script>
        <!-- Purpose JS -->
        <script src="https://extrodigitalpro.com/themes/purposeTheme/assets/js/purpose.js"></script>
        <script type="text/javascript"
            src="https://cdn.datatables.net/v/bs4/dt-1.10.21/af-2.3.5/b-1.6.3/b-flash-1.6.3/b-html5-1.6.3/b-print-1.6.3/r-2.2.5/datatables.min.js">
        </script>
        
        <script src="https://extrodigitalpro.com/themes/purposeTheme/assets/libs/flatpickr/dist/flatpickr.min.js"></script>

            <script src="https://code.jquery.com/jquery-3.6.0.min.js"
            integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
        <!-- Bootstrap Notify -->
        <script src="https://extrodigitalpro.com/dash2/libs/bootstrap-notify/bootstrap-notify.min.js "></script>

        <script>
    let paymethod = document.querySelector('#paymethod');
    var lastchosen = document.getElementById('lastchosen')

    function checkpamethd(id){
        let url = "https://extrodigitalpro.com/dashboard/get-method" + '/' + id;
        fetch(url)
        .then(function(res){
            return res.json();
        })
        .then(function (response){
            paymethod.value = response;
            var paymentchosed = id + 'customCheck1';
            var last = lastchosen.value + 'customCheck1';
           
            if (id === lastchosen.value) {
                document.getElementById(paymentchosed).checked = true;
                lastchosen.value = id;
            }else{
                if (lastchosen.value == 0) {
                    document.getElementById(paymentchosed).checked = true;
                    lastchosen.value = id;
                }else{
                    document.getElementById(last).checked = false;
                    document.getElementById(paymentchosed).checked = true;
                    lastchosen.value = id;
                }
            }
            
            
            $.notify({
                // options
                icon: 'flaticon-alarm-1',
                title: '',
                message: 'you have chosen to pay with ' + ' ' + response,
            },{
                // settings
                type: 'success',
                allow_dismiss: true,
                newest_on_top: false,
                placement: {
                    from: "top",
                    align: "right"
                },
                offset: 20,
                spacing: 10,
                z_index: 1031,
                delay: 5000,
                timer: 1000,
                animate: {
                    enter: 'animated fadeInDown',
                    exit: 'animated fadeOutUp'
                },

            });
        })
        .catch(function(err){
            console.log(err);
        });
    }
    $('#submitpaymentform').on('submit', function() {
        //alert('love');
        if (paymethod.value == "") {
            $.notify({
                // options
                icon: 'flaticon-alarm-1',
                title: '',
                message: 'Please choose a payment method by clicking on it',
            },{
                // settings
                type: 'danger',
                allow_dismiss: true,
                newest_on_top: false,
                placement: {
                    from: "top",
                    align: "right"
                },
                offset: 20,
                spacing: 10,
                z_index: 1031,
                delay: 5000,
                timer: 1000,
                animate: {
                    enter: 'animated fadeInDown',
                    exit: 'animated fadeOutUp'
                },

            });
        }else {
            let makepayurl = "https://extrodigitalpro.com/dashboard/newdeposit"
            document.getElementById("submitpaymentform").action = makepayurl;
            
        }
        
    });
</script>
        
    
    
        <!-- <script src="//code.tidio.co/ggsggsgggg.js" async></script> -->
        
    
 
  </body>

</html>
