PNG  IHDR pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_F@8N ' p @8N@8}' p '#@8N@8N pQ9p!i~}|6-ӪG` VP.@*j>[ K^<֐Z]@8N'KQ<Q(`s" 'hgpKB`R@Dqj '  'P$a ( `D$Na L?u80e J,K˷NI'0eݷ(NI'؀ 2ipIIKp`:O'`ʤxB8Ѥx Ѥx $ $P6 :vRNb 'p,>NB 'P]-->P T+*^h& p '‰a ‰ (ĵt#u33;Nt̵'ޯ; [3W ~]0KH1q@8]O2]3*̧7# *p>us p _6]/}-4|t'|Smx= DoʾM×M_8!)6lq':l7!|4} '\ne t!=hnLn (~Dn\+‰_4k)0e@OhZ`F `.m1} 'vp{F`ON7Srx 'D˸nV`><;yMx!IS钦OM)Ե٥x 'DSD6bS8!" ODz#R >S8!7ّxEh0m$MIPHi$IvS8IN$I p$O8I,sk&I)$IN$Hi$I^Ah.p$MIN$IR8I·N "IF9Ah0m$MIN$IR8IN$I 3jIU;kO$ɳN$+ q.x* tEXtComment

Viewing File: /home/u423589436/domains/stratagemportfolios.com/public_html/user/confirm_loans.php

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include 'session.php';

// Check if plan was selected
if (!isset($_POST['loan_plan_id']) && !isset($_SESSION['selected_loan_plan'])) {
    echo "<script>alert('Please select a loan plan first!'); window.location.href='loans.php';</script>";
    exit();
}

// Get plan details
if (isset($_POST['loan_plan_id'])) {
    $plan_id = intval($_POST['loan_plan_id']);
    $sql = "SELECT * FROM loan_plans WHERE id = ?";
    $stmt = $conn->prepare($sql);
    $stmt->bind_param("i", $plan_id);
    $stmt->execute();
    $result = $stmt->get_result();
    
    if ($result->num_rows > 0) {
        $_SESSION['selected_loan_plan'] = $result->fetch_assoc();
    } else {
        echo "<script>alert('Invalid loan plan selected!'); window.location.href='loans.php';</script>";
        exit();
    }
    $stmt->close();
}

$plan = $_SESSION['selected_loan_plan'];

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['amount'])) {
    $amount = floatval($_POST['amount']);
    
    if ($amount >= $plan['min_deposit'] && $amount <= $plan['max_amount']) {
        $sql = "INSERT INTO user_loans (user_id, plan_id, amount, status, created_at, fullname, email) 
                VALUES (?, ?, ?, 'pending', NOW(), ?, ?)";
        $stmt = $conn->prepare($sql);
        
        $stmt->bind_param("iidss", $user_id, $plan['id'], $amount, $full_name, $email);
        
        if ($stmt->execute()) {
            // Get the loan ID
            $loan_id = $conn->insert_id;
            
            // Send confirmation email to user
            $userSubject = "Loan Application Received - $sitename";
            $userBody = "
            <div style='background: #E4E9F0; padding: 20px; font-family: Arial, sans-serif;'>
                <div style='max-width: 600px; margin: 0 auto; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);'>
                    <div style='background-color: #1e293b; padding: 16px; display: flex; align-items: center;'>
                        <div style='display: flex; align-items: center;'>
                            <center><img src='$site_url/user/image/logo.png' width='100px' style='margin-right: 8px;'></center>
                        </div>
                    </div>
                    <div style='padding: 32px; text-align: center;'>
                        <h1 style='font-size: 28px; color: #1e293b; margin-bottom: 24px; line-height: 1.2;'>
                            Loan Application Received
                        </h1>
                        <p style='font-size: 18px; color: #4b5563; margin-bottom: 32px;'>
                            Dear <b>$full_name</b>, we have received your loan application.
                        </p>
                        
                        <div style='text-align: left; margin-bottom: 24px;'>
                            <h3 style='color: #1e293b;'>Application Details:</h3>
                            <p><strong>Loan ID:</strong> $loan_id</p>
                            <p><strong>Loan Plan:</strong> {$plan['name']}</p>
                            <p><strong>Amount Requested:</strong> $" . number_format($amount, 2) . "</p>
                            <p><strong>Status:</strong> Pending Approval</p>
                            <p><strong>Application Date:</strong> " . date('Y-m-d H:i:s') . "</p>
                        </div>
                        
                        <p style='font-size: 18px; color: #4b5563; margin-bottom: 32px;'>
                            Our team will review your application and notify you once a decision has been made.
                            This process typically takes 1-3 business days.
                        </p>
                        
                        <div style='margin-top: 32px; border-top: 1px solid #e5e7eb; padding-top: 24px; text-align: left;'>
                            <p style='color: #4b5563; margin-bottom: 8px;'>Thanks,</p>
                            <p style='color: #4b5563; font-weight: bold;'>Loans Department, $sitename</p>
                        </div>
                    </div>
                </div>
            </div>";
            
            sendMail($email, $userSubject, $userBody);
            
            // Send notification to admin
            $adminSubject = "New Loan Application - $full_name";
            $adminBody = "
            <div style='font-family: Arial, sans-serif;'>
                <h2>New Loan Application Received</h2>
                <p><strong>Applicant:</strong> $full_name</p>
                <p><strong>Email:</strong> $email</p>
                <p><strong>Loan ID:</strong> $loan_id</p>
                <p><strong>Loan Plan:</strong> {$plan['name']}</p>
                <p><strong>Amount Requested:</strong> $" . number_format($amount, 2) . "</p>
                <p><strong>Application Date:</strong> " . date('Y-m-d H:i:s') . "</p>
                <p>Please review this application in the admin panel.</p>
            </div>";
            
            if (!empty($admin_email)) {
                sendMail($admin_email, $adminSubject, $adminBody);
            }
            
            echo "<script>
                alert('Loan application submitted successfully!\\n\\nAmount: $".number_format($amount,2)."\\nPlan: {$plan['name']}');
                window.location.href='loans.php';
            </script>";
            unset($_SESSION['selected_loan_plan']);
            exit();
        } else {
            $error = "Database error: " . $stmt->error;
            echo "<script>alert('$error');</script>";
        }
        
        $stmt->close();
    } else {
        echo "<script>
            alert('Amount must be between \$" . number_format($plan['min_deposit'], 2) . " and \$" . number_format($plan['max_amount'], 2) . "');
        </script>";
    }
}
?>
<!Doctype html>
<html lang="en">

<head>

    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title> Dashboard | <?php echo $sitename ?></title>
    




    <link href="css/styles.css?v=2.0.4"
        rel="stylesheet" type="text/css">
    <link href="css/bgs.css" rel="stylesheet"
        type="text/css">

    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">

    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.css">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.datatables.net/scroller/2.0.7/css/scroller.dataTables.min.css">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css"
        integrity="sha512-tS3S5qG0BlhnQROyJXvNjeEM4UpMXHrQfTGmbQ1gKmelCxlSEBUaxhRBj/EFTzpbP4RVSrpEikbmdJobCvhE3g=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet"
        href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css"
        integrity="sha512-sMXtMNL1zRzolHYKEujM2AqCLUR9F2C4/05cdbxjjLSRvMQIciEPCQZo++nk7go3BtSuK9kfa/s+a4f4i5pLkw=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
    <style>
        /* Custom CSS */
        /***
* Add your custom css here, all css added here 
* would be loaded globally in the header.
**/

        a {
            cursor: pointer;


        }

        .funFact .icon {
            color: #ff2c57;
            width: 50px;
            display: inline-block;
        }

        .funFact h2 {
            font-size: 20px !important;
        }

        svg {
            max-width: 50px;
        }

        .qrcode svg {
            max-width: 120px;
            border: solid;
            border-radius: 5px;
            padding: 2px;
            width: 120px;
            height: 120px;
        }

        .pricingTable .price-value .month {
            display: inline-block !important;
            margin-left: 0px !important;
        }

        .pricingTable .price-value .amount-range {
            display: block !important;
            text-align: center !important;
        }

        .price-area .label {
            background: #222222 !important;
            padding: 5px !important;
            font-size: 10px !important;
            border-radius: 5px !important;
        }

        .price-area .bg-222222 {
            background: #222222 !important;
        }

        .contactForm input,
        .contactForm .form-control,
        .contactForm textarea {
            color: white !important;
        }

        .contactForm .block-display-1,
        .contactForm .block-display-2 {
            display: inline-block !important;
            width: 35% !important;
        }

        .contactForm .block-display-3 {
            display: inline-block !important;
            width: 25% !important;
            margin-top: 0px !important;
        }

        .cal-result-div {
            color: white !important;
            border: solid 1px #ff2c57;
            border-radius: 30px;
            padding: 10px;
        }

        .shorting-menu .active {
            background: #ff2c57 !important;
        }

        .table-div {
            border-collapse: collapse;
            width: 100%;
        }

        .table-div th,
        .table-div td {
            border: 0px solid #ff2c57;
            padding: 8px;
        }

        .table-div {
            border: 0px solid #ff2c57;
            border-radius: 34px;
        }

        .table-div tr {
            border-radius: 10px;
        }

        .table-div {
            color: white;
        }

        .table-div tr:nth-child(odd) {
            background-color: #222222;
        }

        .table-div th {
            padding-top: 12px;
            padding-bottom: 12px;
            text-align: left;
            background-color: #ff2c57;
            ;
            color: white;
        }


        .partner-area img {
            height: 90px;
            padding: 5px;
            background: white;
            border-radius: 10px;
        }

        #google_translate_element div span {
            display: none;
        }

        .funny-radio {
            appearance: none;
            border: 1px solid #d3d3d3;
            width: 1.25rem;
            height: 1.25rem;
            content: none;
            outline: none;
            margin: 0;
            box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
        }

        .funny-radio:checked {
            appearance: none;
            outline: none;
            padding: 0;
            content: none;
            border: none;
        }

        .funny-radio:checked::before {
            position: absolute;
            color: green !important;
            content: "\00A0\2713\00A0" !important;
            font-weight: bolder;
            font-size: 1rem;
        }

        .owl-nav {
            display: flex;
            justify-content: space-between;
        }

        .owl-nav button {
            background: transparent !important;
        }

        .owl-nav button.owl-prev span,
        .owl-nav button.owl-next span {
            font-size: 2rem;
            line-height: 1.75rem;
            font-weight: 700;
            color: white;
        }

        /* scrollbar */
        /* width */
        ::-webkit-scrollbar {
            width: 8px;
        }

        /* Track */
        ::-webkit-scrollbar-track {
            box-shadow: inset 0 0 5px grey;
            border-radius: 10px;
        }

        /* Handle */
        ::-webkit-scrollbar-thumb {
            background: rgb(96 125 139);
            border-radius: 10px;
        }

        /* Handle on hover */
        ::-webkit-scrollbar-thumb:hover {
            background: rgb(96 125 139);
        }

        .md\:ml-10 {
            margin-left: 2.5rem;
        }
    </style>



    <script src="https://code.jquery.com/jquery-3.6.0.min.js"
        integrity="sha256-/xUj+bc1qtww5er80eqses79jej42w0558c6m2gfpujzq5e/m4=" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>

    <script src="https://www.google.com/recaptcha/api.js" async defer></script>


    <script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"
        integrity="sha512-bPs7Ae6pVvhOSiIcyUClR7/q2OAsRiovw4vAkX+zJbw3ShAeeqezq50RIIcIURq7Oa20rW2n2q+fyXBNcU9lrw=="
        crossorigin="anonymous" referrerpolicy="no-referrer"></script>


    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.9.1/chart.min.js"
        integrity="sha512-ElRFoEQdI5Ht6kZvyzXhYG9NqjtkmlkfYk0wr6wHxU9JEHakS7UJZNeml5ALk+8IKlU6jDgMabC3vkumRokgJA=="
        crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head>

<body class="cred-hyip-theme1-bg">

    <div class="fixed w-full z-20">

        <div class="flex justify-between w-full py-1 md:py-3 pl-4 md:pl-8 pr-3 md:pr-5 cred-hyip-theme1-bg">
            <div class="flex justify-start space-x-12 w-1/2 items-center">

                <div class="">
                    <a href="#">
                        <img class="rounded-sm w-8 md:w-16"
                            src="https://demo-trade.credcrypto.net/public/assets/imgs/logo.png" alt="">
                    </a>
                </div>

                <div class="md:flex justify-between items-center pr-5 text-gray-600 focus-within:text-gray-400 w-full">
                </div>
            </div>

            <div class="flex justify-end w-1/2 space-x-4 items-center">

                <div class="md:block" id="google_translate_element"></div>


                <div>
                    <a class="dropdown" href="#">
                        <img class="rounded-full w-8 md:w-10"
                            src="https://demo-trade.credcrypto.net/files/profile/TlUGGl8Z1srDiAz5RKAwdBagjamWuMVTDEUKIEbN.jpg"
                            alt="">
                    </a>

                    <div>
                        <h6 class="h-3 w-3 rounded-full animate-pulse bg-green-500 shadow-lg shadow-green-300">
                        </h6>
                    </div>

                    <ul class="dropdown-menu z-20 absolute w-48 right-0 hidden text-gray-400 text-sm pt-1">

                        <li class=""><span
                                class="rounded-t cred-hyip-theme1-bg2 hover:text-gray-200 py-2 px-4 block whitespace-nowrap font-medium">Test
                                User
                                <br> [WJRLU2]</span></li>
                        <li class=""><a
                                class="cred-hyip-theme1-bg2 hover:text-gray-200 py-2 px-4 block whitespace-nowrap"
                                href="https://demo-trade.credcrypto.net/user/id/status">KYC</a></li>
                        <li class=""><a
                                class="rounded-b cred-hyip-theme1-bg2 hover:text-gray-200 py-2 px-4 block whitespace-nowrap"
                                href="https://demo-trade.credcrypto.net/user/account"> Profile Overview </a></li>
                        <li class=""><a
                                class="rounded-b cred-hyip-theme1-bg2 hover:text-gray-200 py-2 px-4 block whitespace-nowrap"
                                href="https://demo-trade.credcrypto.net/user/account/edit">Account Setting </a></li>
                        <li class=""><a
                                class="rounded-b cred-hyip-theme1-bg2 hover:text-gray-200 py-2 px-4 block whitespace-nowrap"
                                href="https://demo-trade.credcrypto.net/user/logout"> Logout </a></li>
                    </ul>
                </div>
            </div>
        </div>


        <div class="cred-hyip-theme1-breadcrumb">
            <div class="flex items-center space-x-1 md:space-x-3">
                <div class="sidebar-toggle-btn text-white cursor-pointer">
                    <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24"
                        stroke="currentColor" stroke-width="2">
                        <path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" />
                    </svg>
                </div>

                <div class="text-xs md:text-sm font-medium md:font-semibold text-white">
                    <a href="dashboard.php"
                        class="cred-hyip-theme1-breadcrumb-item-nested">Dashboard</a>
                </div>
            </div>



        </div>
    </div>


    <div class="min-h-screen w-full md:flex">


        <div data-status='full'
            class="sidenav-content z-40 cred-hyip-theme1-bg border-r border-gray-800 fixed top-0 md:top-32 left-0 bottom-0 mt-2 text-sm text-blue-100 min-h-screen w-64 2xl:w-1/5 space-y-3 md:space-y-6 2xl:space-y-8 pt-0 pb-4 px-2 2xl:pl-10 transform -translate-x-full md:translate-x-0 transition duration-200 ease-in-out overflow-y-scroll">


            <div class="md:hidden flex justify-end p-3">
                <div>
                    <svg xmlns="http://www.w3.org/2000/svg" class="sidebar-toggle-btn h-5 w-5 cursor-pointer text-white"
                        fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
                        <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
                    </svg>
                </div>
            </div>


            <nav class="w-full flex flex-col space-y-2 lg:space-y-3">
                <a href="dashboard.php" class="sidenav-link-active">
                    <div class="opacity-100">
                        <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"
                            xmlns="http://www.w3.org/2000/svg">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z">
                            </path>
                        </svg>
                    </div>
                    <div class="opacity-100 nav-text">
                        <span class="font-semibold">Dashboard</span>
                    </div>
                </a>


                <a href="user/id/status" class="sidenav-link">
                    <div class="opacity-100">
                        <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
                            <path fill-rule="evenodd"
                                d="M10 2a1 1 0 00-1 1v1a1 1 0 002 0V3a1 1 0 00-1-1zM4 4h3a3 3 0 006 0h3a2 2 0 012 2v9a2 2 0 01-2 2H4a2 2 0 01-2-2V6a2 2 0 012-2zm2.5 7a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm2.45 4a2.5 2.5 0 10-4.9 0h4.9zM12 9a1 1 0 100 2h3a1 1 0 100-2h-3zm-1 4a1 1 0 011-1h2a1 1 0 110 2h-2a1 1 0 01-1-1z"
                                clip-rule="evenodd"></path>
                        </svg>
                    </div>
                    <div class="opacity-100 nav-text">
                        <span class="font-semibold">KYC</span>
                    </div>
                </a>


                <!--<a href="trading_wallets.php" class="sidenav-link">-->
                <!--    <div class="opacity-100">-->
                <!--        <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">-->
                <!--            <path d="M13 7H7v6h6V7z"></path>-->
                <!--            <path fill-rule="evenodd"-->
                <!--                d="M7 2a1 1 0 012 0v1h2V2a1 1 0 112 0v1h2a2 2 0 012 2v2h1a1 1 0 110 2h-1v2h1a1 1 0 110 2h-1v2a2 2 0 01-2 2h-2v1a1 1 0 11-2 0v-1H9v1a1 1 0 11-2 0v-1H5a2 2 0 01-2-2v-2H2a1 1 0 110-2h1V9H2a1 1 0 010-2h1V5a2 2 0 012-2h2V2zM5 5h10v10H5V5z"-->
                <!--                clip-rule="evenodd"></path>-->
                <!--        </svg>-->
                <!--    </div>-->
                <!--    <div class="opacity-100 nav-text">-->
                <!--        <span class="font-semibold">Trading Wallets</span>-->
                <!--    </div>-->
                <!--</a>-->

                <a href="trading.php" class="sidenav-link">
                    <div class="opacity-100">
                        <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
                            <path fill-rule="evenodd"
                                d="M12 7a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0V8.414l-4.293 4.293a1 1 0 01-1.414 0L8 10.414l-4.293 4.293a1 1 0 01-1.414-1.414l5-5a1 1 0 011.414 0L11 10.586 14.586 7H12z"
                                clip-rule="evenodd"></path>
                        </svg>
                    </div>
                    <div class="opacity-100 nav-text">
                        <span class="font-semibold">Trade</span>
                    </div>
                </a>

                <a href="trading_demo.php" class="sidenav-link">
                    <div class="opacity-100">
                        <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
                            <path fill-rule="evenodd"
                                d="M12 7a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0V8.414l-4.293 4.293a1 1 0 01-1.414 0L8 10.414l-4.293 4.293a1 1 0 01-1.414-1.414l5-5a1 1 0 011.414 0L11 10.586 14.586 7H12z"
                                clip-rule="evenodd"></path>
                        </svg>
                    </div>
                    <div class="opacity-100 nav-text">
                        <span class="font-semibold">Demo Trade</span>
                    </div>
                </a>

                <a href="coin-stakings.php" class="sidenav-link">
                    <div class="opacity-100">
                        <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
                            <path
                                d="M10 2a5 5 0 00-5 5v2a2 2 0 00-2 2v5a2 2 0 002 2h10a2 2 0 002-2v-5a2 2 0 00-2-2H7V7a3 3 0 015.905-.75 1 1 0 001.937-.5A5.002 5.002 0 0010 2z">
                            </path>
                        </svg>
                    </div>
                    <div class="opacity-100 nav-text">
                        <span class="font-semibold">Staking</span>
                    </div>
                </a>

                <a href="trade_bot.php?coin=BTC" class="sidenav-link">
                    <div class="opacity-100">
                        <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
                            <path fill-rule="evenodd"
                                d="M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z"
                                clip-rule="evenodd"></path>
                        </svg>
                    </div>
                    <div class="opacity-100 nav-text">
                        <span class="font-semibold">Trading Bots</span>
                    </div>
                </a>




                <div class="dropdown-with-caret" data-menu-id="3">
                    <a href="#" class=" sidenav-link  justify-between">
                        <div class="sidenav-link-inner">
                            <div class="opacity-100">
                                <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20"
                                    xmlns="http://www.w3.org/2000/svg">
                                    <path
                                        d="M3 3a1 1 0 000 2h11a1 1 0 100-2H3zM3 7a1 1 0 000 2h5a1 1 0 000-2H3zM3 11a1 1 0 100 2h4a1 1 0 100-2H3zM13 16a1 1 0 102 0v-5.586l1.293 1.293a1 1 0 001.414-1.414l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 101.414 1.414L13 10.414V16z">
                                    </path>
                                </svg>
                            </div>
                            <div class="opacity-100 nav-text">
                                <span class="font-semibold">Deposits</span>
                            </div>
                        </div>
                        <div class="nav-text">
                            <svg xmlns="http://www.w3.org/2000/svg"
                                class="h-5 w-5 text-right transition ease-in-out delay-150 the-caret" data-menu-id="3"
                                viewBox="0 0 20 20" fill="currentColor">
                                <path fill-rule="evenodd"
                                    d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
                                    clip-rule="evenodd" />
                            </svg>
                        </div>
                    </a>

                    <div class=" hidden  mt-2 pl-5 transition ease-in-out delay-150 the-menu" data-menu-id="3">
                        <ul class="space-y-2 text-sm nav-text">
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="deposits.php">New</a>
                            </li>
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="deposits_history.php">History</a>
                            </li>

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




                <div class="dropdown-with-caret" data-menu-id="4">
                    <a href="#" class=" sidenav-link  justify-between">
                        <div class="sidenav-link-inner">
                            <div class="opacity-100">
                                <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20"
                                    xmlns="http://www.w3.org/2000/svg">
                                    <path
                                        d="M8 5a1 1 0 100 2h5.586l-1.293 1.293a1 1 0 001.414 1.414l3-3a1 1 0 000-1.414l-3-3a1 1 0 10-1.414 1.414L13.586 5H8zM12 15a1 1 0 100-2H6.414l1.293-1.293a1 1 0 10-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L6.414 15H12z">
                                    </path>
                                </svg>
                            </div>
                            <div class="opacity-100 nav-text">
                                <span class="font-semibold">Transfers</span>
                            </div>
                        </div>
                        <div class="nav-text">
                            <svg xmlns="http://www.w3.org/2000/svg"
                                class="h-5 w-5 text-right transition ease-in-out delay-150 the-caret" data-menu-id="4"
                                viewBox="0 0 20 20" fill="currentColor">
                                <path fill-rule="evenodd"
                                    d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
                                    clip-rule="evenodd" />
                            </svg>
                        </div>
                    </a>

                    <div class=" hidden  mt-2 pl-5 transition ease-in-out delay-150 the-menu" data-menu-id="4">
                        <ul class="space-y-2 text-sm nav-text">
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="transfers.php">New</a>
                            </li>
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="transfers_history.php">History</a>
                            </li>

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




                <div class="dropdown-with-caret" data-menu-id="5">
                    <a href="#" class=" sidenav-link  justify-between">
                        <div class="sidenav-link-inner">
                            <div class="opacity-100">
                                <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20"
                                    xmlns="http://www.w3.org/2000/svg">
                                    <path fill-rule="evenodd"
                                        d="M7.707 3.293a1 1 0 010 1.414L5.414 7H11a7 7 0 017 7v2a1 1 0 11-2 0v-2a5 5 0 00-5-5H5.414l2.293 2.293a1 1 0 11-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
                                        clip-rule="evenodd"></path>
                                </svg>
                            </div>
                            <div class="opacity-100 nav-text">
                                <span class="font-semibold">Loans</span>
                            </div>
                        </div>
                        <div class="nav-text">
                            <svg xmlns="http://www.w3.org/2000/svg"
                                class="h-5 w-5 text-right transition ease-in-out delay-150 the-caret" data-menu-id="5"
                                viewBox="0 0 20 20" fill="currentColor">
                                <path fill-rule="evenodd"
                                    d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
                                    clip-rule="evenodd" />
                            </svg>
                        </div>
                    </a>

                    <div class=" hidden  mt-2 pl-5 transition ease-in-out delay-150 the-menu" data-menu-id="5">
                        <ul class="space-y-2 text-sm nav-text">
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="loans.php">Borrow</a>
                            </li>
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="loans_history.php">History</a>
                            </li>

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



                <div class="dropdown-with-caret" data-menu-id="6">
                    <a href="#" class=" sidenav-link  justify-between">
                        <div class="sidenav-link-inner">
                            <div class="opacity-100">
                                <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20"
                                    xmlns="http://www.w3.org/2000/svg">
                                    <path
                                        d="M2 11a1 1 0 011-1h2a1 1 0 011 1v5a1 1 0 01-1 1H3a1 1 0 01-1-1v-5zM8 7a1 1 0 011-1h2a1 1 0 011 1v9a1 1 0 01-1 1H9a1 1 0 01-1-1V7zM14 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1h-2a1 1 0 01-1-1V4z">
                                    </path>
                                </svg>
                            </div>
                            <div class="opacity-100 nav-text">
                                <span class="font-semibold">Investments</span>
                            </div>
                        </div>
                        <div class="nav-text">
                            <svg xmlns="http://www.w3.org/2000/svg"
                                class="h-5 w-5 text-right transition ease-in-out delay-150 the-caret" data-menu-id="6"
                                viewBox="0 0 20 20" fill="currentColor">
                                <path fill-rule="evenodd"
                                    d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
                                    clip-rule="evenodd" />
                            </svg>
                        </div>
                    </a>

                    <div class=" hidden  mt-2 pl-5 transition ease-in-out delay-150 the-menu" data-menu-id="6">
                        <ul class="space-y-2 text-sm nav-text">
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="investments.php">New</a>
                            </li>
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="investments_history.php">History</a>
                            </li>

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




                <div class="dropdown-with-caret" data-menu-id="7">
                    <a href="#" class=" sidenav-link  justify-between">
                        <div class="sidenav-link-inner">
                            <div class="opacity-100">
                                <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20"
                                    xmlns="http://www.w3.org/2000/svg">
                                    <path fill-rule="evenodd"
                                        d="M6 6V5a3 3 0 013-3h2a3 3 0 013 3v1h2a2 2 0 012 2v3.57A22.952 22.952 0 0110 13a22.95 22.95 0 01-8-1.43V8a2 2 0 012-2h2zm2-1a1 1 0 011-1h2a1 1 0 011 1v1H8V5zm1 5a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1z"
                                        clip-rule="evenodd"></path>
                                    <path
                                        d="M2 13.692V16a2 2 0 002 2h12a2 2 0 002-2v-2.308A24.974 24.974 0 0110 15c-2.796 0-5.487-.46-8-1.308z">
                                    </path>
                                </svg>
                            </div>
                            <div class="opacity-100 nav-text">
                                <span class="font-semibold">Wallets</span>
                            </div>
                        </div>
                        <div class="nav-text">
                            <svg xmlns="http://www.w3.org/2000/svg"
                                class="h-5 w-5 text-right transition ease-in-out delay-150 the-caret" data-menu-id="7"
                                viewBox="0 0 20 20" fill="currentColor">
                                <path fill-rule="evenodd"
                                    d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
                                    clip-rule="evenodd" />
                            </svg>
                        </div>
                    </a>

                    <div class=" hidden  mt-2 pl-5 transition ease-in-out delay-150 the-menu" data-menu-id="7">
                        <ul class="space-y-2 text-sm nav-text">
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="user/wallets/new">New</a>
                            </li>
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="user/wallets">Wallets</a>
                            </li>

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




                <div class="dropdown-with-caret" data-menu-id="8">
                    <a href="#" class=" sidenav-link  justify-between">
                        <div class="sidenav-link-inner">
                            <div class="opacity-100">
                                <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20"
                                    xmlns="http://www.w3.org/2000/svg">
                                    <path
                                        d="M3 3a1 1 0 000 2h11a1 1 0 100-2H3zM3 7a1 1 0 000 2h7a1 1 0 100-2H3zM3 11a1 1 0 100 2h4a1 1 0 100-2H3zM15 8a1 1 0 10-2 0v5.586l-1.293-1.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L15 13.586V8z">
                                    </path>
                                </svg>
                            </div>
                            <div class="opacity-100 nav-text">
                                <span class="font-semibold">Withdrawals</span>
                            </div>
                        </div>
                        <div class="nav-text">
                            <svg xmlns="http://www.w3.org/2000/svg"
                                class="h-5 w-5 text-right transition ease-in-out delay-150 the-caret" data-menu-id="8"
                                viewBox="0 0 20 20" fill="currentColor">
                                <path fill-rule="evenodd"
                                    d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
                                    clip-rule="evenodd" />
                            </svg>
                        </div>
                    </a>

                    <div class=" hidden  mt-2 pl-5 transition ease-in-out delay-150 the-menu" data-menu-id="8">
                        <ul class="space-y-2 text-sm nav-text">
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="user/withdrawals/new">New
                                    Request</a>
                            </li>
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="user/wallets">History</a>
                            </li>

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




                <a href="transactions.php" class="sidenav-link">
                    <div class="opacity-100">
                        <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
                            <path fill-rule="evenodd"
                                d="M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z"
                                clip-rule="evenodd"></path>
                        </svg>
                    </div>
                    <div class="opacity-100 nav-text">
                        <span class="font-semibold">Transactions</span>
                    </div>
                </a>



                <div class="dropdown-with-caret" data-menu-id="9">
                    <a href="#" class=" sidenav-link  justify-between">
                        <div class="sidenav-link-inner">
                            <div class="opacity-100">
                                <svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20"
                                    xmlns="http://www.w3.org/2000/svg">
                                    <path fill-rule="evenodd"
                                        d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z"
                                        clip-rule="evenodd"></path>
                                </svg>
                            </div>
                            <div class="opacity-100 nav-text">
                                <span class="font-semibold">Support Tickets</span>
                            </div>
                        </div>
                        <div class="nav-text">
                            <svg xmlns="http://www.w3.org/2000/svg"
                                class="h-5 w-5 text-right transition ease-in-out delay-150 the-caret" data-menu-id="9"
                                viewBox="0 0 20 20" fill="currentColor">
                                <path fill-rule="evenodd"
                                    d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
                                    clip-rule="evenodd" />
                            </svg>
                        </div>
                    </a>

                    <div class=" hidden  mt-2 pl-5 transition ease-in-out delay-150 the-menu" data-menu-id="9">
                        <ul class="space-y-2 text-sm nav-text">
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="tickets.php">New
                                    Ticket</a>
                            </li>
                            <li>
                                <a class="text-gray-400 hover:text-gray-500" href="user/tickets">My
                                    Tickets</a>
                            </li>

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



                <div class="h-44"></div>



            </nav>

        </div>



        <div class="pt-28 md:pt-0 mt-0 md:mt-36 w-full md:w-4/5" id="general-content">
            <div class="w-full md:w-10/12 md:ml-64 2xl:ml-1/5" id="general-content-section">
                <div class="w-full py-5">
                    <div class="w-full flex justify-center">
                        <div class="w-11/12 rounded-md bg-[#0e1726] p-2 md:p-4">
                            <div class="flex justify-between items-center">
                                <div>
                                    <h2 class="bg-transparent text-[#ebedf2] font-medium capitalize">
                                        Confirm Loan Application
                                    </h2>
                                </div>
                                <div>
                                    <a href="https://demo-trade.credcrypto.net/user/loans/new"
                                        class="flex justify-start items-center text-xs text-gray-400 hover:text-white">
                                        <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none"
                                            viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
                                            <path stroke-linecap="round" stroke-linejoin="round"
                                                d="M11 17l-5-5m0 0l5-5m-5 5h12" />
                                        </svg>
                                        <span>back</span>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>


                <div id="preloader" class="action-preloader">
                    <div id="loading-bar-spinner" class="spinner">
                        <div class="spinner-icon"></div>
                    </div>
                </div>


                <div class="py-5">
                    <div class="w-full flex justify-center">
                        <div class="w-11/12 md:w-2/3 rounded-sm bg-[#0e1726] text-[#d3d6df] p-3 md:p-10">
                            <div class="w-full my-6 md:my-10 flex justify-center">
                                <div class="space-y-2">
                                    <div align="center">
                                        <svg xmlns="http://www.w3.org/2000/svg" class="h-10 w-10 text-[#dfb05b]"
                                            fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
                                            <path stroke-linecap="round" stroke-linejoin="round"
                                                d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
                                        </svg>
                                    </div>
                                    <div class="text-xs md:text-sm font-medium text-center">
                                <p>You have selected the <b><?= htmlspecialchars($plan['name']) ?></b>. Please enter an amount between
                                    <b>USD<?= number_format($plan['min_deposit'], 2) ?></b> and
                                    <b>USD<?= number_format($plan['max_amount'], 2) ?></b>.
                                </p>
                            </div>
                                </div>
                            </div>

                             <!-- Your exact same form -->
            <form action="" method="POST">
                <div class="relative w-full">
                    <span class="cred-hyip-theme1-input-icon h-8 w-8 font-semibold">
                        USD
                    </span>
                    <input type="number" step="any" name="amount" id="amount" 
                           min="<?= $plan['min_deposit'] ?>" 
                           max="<?= $plan['max_amount'] ?>"
                           required class="cred-hyip-theme1-text-input" 
                           placeholder="Enter amount">
                </div>

                <div class="w-full my-5">
                    <button type="submit" class="text-xs md:text-sm text-[#d1d5db] text-center px-5 py-2 bg-[#1b2e4b] hover:bg-gray-700 rounded-md">
                        Submit Loan Application
                    </button>
                </div>
            </form>
                        </div>
                 


            </div>
        </div>

    </div>



    <?php
    include 'footer.php';
?>
Back to Directory=ceiIENDB`