<?php

include('php/database.php');
include('php/security.php');
session_start();
if (logged_in()) {
    header('location:../login.php');
}
$id = $_SESSION['id'];
$results = mysqli_query($connection, "SELECT `date`, `id`, `name`, `email`, `number`, `password`, `phone`, `address`, `country`, `gender`, `image`, `vcode`, `verified`, `verify`, `balance`, `totalbalance`, `investbalance`, `profit`, `totaldeposit`, `totalwithdrawal`, `loanlimit`, `availableloan`, `ongoingloan`, `savings`, `idcard`, `idcardback`, `accountstatus`, `pina`, `pinb`, `pinc`, `pind` FROM users WHERE id ='$id'");
$retrive = mysqli_fetch_array($results);
$date = $retrive['date'];
$id = $retrive['id'];
$name = $retrive['name'];
$email = $retrive['email'];
$number = $retrive['number'];
$password = $retrive['password'];
$phone = $retrive['phone'];
$address = $retrive['address'];
$country = $retrive['country'];
$gender = $retrive['gender'];
$image = $retrive['image'];
$vcode = $retrive['vcode'];
$verified = $retrive['verified'];
$verify = $retrive['verify'];
$balance = $retrive['balance'];
$totalbalance = $retrive['totalbalance'];
$investbalance = $retrive['investbalance'];
$profit = $retrive['profit'];
$totaldeposit = $retrive['totaldeposit'];
$totalwithdrawal = $retrive['totalwithdrawal'];
$loanlimit = $retrive['loanlimit'];
$availableloan = $retrive['availableloan'];
$ongoingloan = $retrive['ongoingloan'];
$savings = $retrive['savings'];
$idcard = $retrive['idcard'];
$idcardback = $retrive['idcardback'];
$accountstatus = $retrive['accountstatus'];
$pina = $retrive['pina'];
$pinb = $retrive['pinb'];
$pinc = $retrive['pinc'];
$pind = $retrive['pind'];

?>



<!DOCTYPE html>
<html lang="en">


<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- Mobile Specific Metas -->
    <meta name="viewport" content="width=device-width, initial-scale=0.7, viewport-fit=cover">
    <title>Request card</title>
    <!-- Favicon and Touch Icons  -->
    <link rel="shortcut icon" href="images/logo.png" />
    <link rel="apple-touch-icon-precomposed" href="images/logo.png" />
    <!-- Font -->
    <link rel="stylesheet" href="fonts/fonts.css" />
    <!-- Icons -->
    <link rel="stylesheet" href="fonts/icons-alipay.css">
    <link rel="stylesheet" href="styles/bootstrap.css">

    <link rel="stylesheet" type="text/css" href="styles/styles.css" />
    <link rel="manifest" href="_manifest.json" data-pwa-version="set_in_manifest_and_pwa_js">
    <link rel="apple-touch-icon" sizes="192x192" href="app/icons/icon-192x192.png">

    <script src="https://cdn.tailwindcss.com"></script>
</head>

<body class="font-sans text-[12px] leading-[20px] font-medium text-textGray bg-white w-full m-auto overflow-hidden">
    <!-- preloade -->
    <div class="preload preload-container">
        <div class="preload-logo">
            <div class="spinner"></div>
        </div>
    </div>
    <!-- /preload -->
    <div class="header">
        <div class="tf-container">
            <div class="tf-statusbar d-flex justify-content-center align-items-center">
                <a href="#" class="back-btn"> <i class="icon-left"></i> </a>
                <h3>Request Card </h3>&nbsp; &nbsp; <div class="gtranslate_wrapper"></div>
                <script>window.gtranslateSettings = { "default_language": "en", "detect_browser_language": true, "wrapper_selector": ".gtranslate_wrapper" }</script>
                <script src="https://cdn.gtranslate.net/widgets/latest/dropdown.js" defer></script>
            </div>
        </div>
    </div>
    <div class="content-by-bank mt-3">
        <div class="tf-container">

            <div class="max-w-lg mx-auto bg-white p-6 rounded-lg shadow-md border border-gray-200">
                <h2 class="text-xl font-semibold text-gray-800 mb-4 text-center">Request a Card</h2>

                <form class="space-y-4" action="php/request.php" method="post">
                    <!-- Card Type Selection -->
                    <div>
                        <label for="card-type" class="block text-sm font-medium text-gray-700 mb-1">Select Card
                            Type</label>
                        <div class="relative">
                            <select id="card-type" required name="card"
                                class="block w-full px-4 py-3 pr-10 text-gray-700 bg-white border border-gray-300 rounded-lg shadow-sm focus:ring-blue-500 focus:border-blue-500 appearance-none">
                                <option class="text-gray-700 bg-white hover:bg-blue-100" value="" disabled selected>
                                    Choose a card type</option>
                                <option class="text-gray-700 bg-white hover:bg-blue-100" value="visa">Visa</option>
                                <option class="text-gray-700 bg-white hover:bg-blue-100" value="mastercard">Mastercard
                                </option>
                                <option class="text-gray-700 bg-white hover:bg-blue-100" value="verve">Verve</option>
                                <option class="text-gray-700 bg-white hover:bg-blue-100" value="amex">American Express
                                </option>
                                <option class="text-gray-700 bg-white hover:bg-blue-100" value="discover">Discover
                                </option>
                                <option class="text-gray-700 bg-white hover:bg-blue-100" value="others">Other</option>
                            </select>
                            <span class="absolute inset-y-0 right-3 flex items-center pointer-events-none">
                                <svg class="w-5 h-5 text-gray-500" xmlns="http://www.w3.org/2000/svg" fill="none"
                                    viewBox="0 0 24 24" stroke="currentColor">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
                                        d="M19 9l-7 7-7-7" />
                                </svg>
                            </span>
                        </div>
                    </div>

                    <!-- Name on Card -->
                    <div>
                        <label for="name-on-card" class="block text-sm font-medium text-gray-700 mb-1">Name on
                            Card</label>
                        <input type="text" required id="name-on-card" name="name" placeholder="Enter your name"
                            class="block w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm text-gray-700 focus:ring-blue-500 focus:border-blue-500">
                    </div>

                    <!-- Pickup Address -->
                    <div>
                        <label for="pickup-address" class="block text-sm font-medium text-gray-700 mb-1">Pickup
                            Address</label>
                        <textarea required id="pickup-address" name="address" rows="3"
                            placeholder="Enter pickup address"
                            class="block w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm text-gray-700 focus:ring-blue-500 focus:border-blue-500"></textarea>
                    </div>

                    <!-- Submit Button -->
                    <div class="flex justify-center">
                        <button type="submit" name="submit"
                            class="w-full max-w-xs px-4 py-3 text-white bg-blue-300 rounded-lg font-medium shadow-md hover:bg-blue-800 transition">
                            Submit Request
                        </button>
                    </div>
                </form>
            </div>


        </div>
    </div>




    <script type="text/javascript" src="javascript/jquery.min.js"></script>
    <script type="text/javascript" src="javascript/bootstrap.min.js"></script>
    <script type="text/javascript" src="javascript/main.js"></script>

</body>


</html>