PHP WebShell

Текущая директория: /var/www/bitcardoApp/auth

Просмотр файла: register.php

<? 
session_start();
include 'header.php'; 
$error = $_SESSION['error'] ?? '';
$form_data = $_SESSION['form_data'] ?? [];
unset($_SESSION['error'], $_SESSION['form_data']);
?>
<div class="container">
    <div class="offset-md-4 col-md-4">
        <div class="form-signin text-center mt-2 pt-2 px-3">
            <h2 class="mb-1 fw-semibold">Create Your Bitcardo Account</h2>
            <p class="text-muted mb-4">Already have an account?
                <a href="login.php" class="text-decoration-none fw-semibold text-primary">Log In</a>
            </p>

            <form method="POST" action="../models/auth/register_process.php">
                <?php if ($error): ?>
                    <div class="mb-3" style="color: red;"><?= htmlspecialchars($error) ?></div>
                <?php endif; ?>
                <input type="hidden" name="csrf" value="<?= htmlspecialchars($_SESSION['csrf'] ?? '') ?>">

                <div class="mb-3 text-start">
                    <label for="email" class="form-label ms-1">First Name</label>
                    <input type="fname" class="form-control" name="first_name" id="fname" placeholder="Yinusa" value="<?= htmlspecialchars($form_data['first'] ?? '') ?>" required />
                </div>

                <div class="mb-3 text-start">
                    <label for="email" class="form-label ms-1">Last Name</label>
                    <input type="lname" class="form-control" name="last_name" id="lname" placeholder="Ciroma" value="<?= htmlspecialchars($form_data['last'] ?? '') ?>" required />
                </div>

                <div class="mb-3 text-start">
                    <label for="email" class="form-label ms-1">Email</label>
                    <input type="email" class="form-control" name="email" id="email" placeholder="you@example.com"  value="<?= htmlspecialchars($form_data['email'] ?? '') ?>" required />
                </div>

                <div class="mb-3 text-start">
                    <label for="phone" class="form-label ms-1">Phone Number</label>
                    <input name="phone" class="form-control" id="phone" placeholder="08012345690"  value="<?= htmlspecialchars($form_data['phone'] ?? '') ?>" required />
                </div>

                <div class="mb-4 text-start position-relative">
                    <label for="password" class="form-label ms-1">Password</label>
                    <input type="password" class="form-control" name="password" id="password" placeholder="Enter your password" required />
                    <span class="position-toggle" onclick="togglePassword()">
                        <i class="bi bi-eye"></i>
                    </span>
                </div>

                <div class="captcha-wrapper mb-3 text-start">
                    <div class="g-recaptcha scaled-recaptcha" data-sitekey="6Lf4qEwrAAAAAK_FFSjShu9YmY-iNHecBSCvYcOE"></div>
                </div>
                <button class="w-100 btn btn-primary rounded-5 btn-lg mb-2" type="submit">Register</button>

                <div class="mb-3">
                    <a href="#" class="text-decoration-none btn btn-white">Trouble logging in?</a>
                </div>

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

<script>
function togglePassword() {
    const passwordInput = document.getElementById("password");
    const icon = document.querySelector(".position-toggle svg");
    const isPassword = passwordInput.type === "password";
    passwordInput.type = isPassword ? "text" : "password";
    icon.classList.toggle("bi-eye");
    icon.classList.toggle("bi-eye-slash");
}
</script>
<? include 'footer.php'; ?>

Выполнить команду


Для локальной разработки. Не используйте в интернете!