PHP WebShell
Текущая директория: /var/www/bitcardoApp/auth
Просмотр файла: forgot.php
<?php
// auth/forgot.php — Request a password reset code (email or phone)
require_once __DIR__ . '/../config/bootstrap.php';
// Flash messages (set by forgot_process.php)
$flash = $_SESSION['flash'] ?? null;
unset($_SESSION['flash']);
// (Optional) preserve last entered login if set by server
$prefill = $_SESSION['prefill_login'] ?? '';
// Do NOT unset prefill here; we want it to persist to reset.php if needed.
include __DIR__ . '/header.php';
?>
<style>
.btn-secure-primary{ background:#076289; border-color:#076289; color:#fff !important; font-weight:600; }
.btn-secure-primary:hover{ background:#fff; color:#076289 !important; border-color:#076289 !important; box-shadow:0 0 0 3px rgba(7,98,137,.12); }
.card-soft { border:1px solid rgba(7,98,137,.12); border-radius:12px; background:#fff; box-shadow:0 8px 24px rgba(7,98,137,.06); }
.muted{ color:#6b7280; }
</style>
<div class="container">
<div class="offset-md-4 col-md-4">
<div class="form-signin text-start mt-4 card-soft p-4">
<h3 class="mb-1">Reset your password</h3>
<p class="muted">Enter your email or phone. We’ll send a 6-digit code to verify it’s you.</p>
<?php if (!empty($flash['error'])): ?>
<div class="alert alert-danger"><?= htmlspecialchars($flash['error']) ?></div>
<?php elseif (!empty($flash['ok'])): ?>
<div class="alert alert-primary"><?= htmlspecialchars($flash['ok']) ?></div>
<?php endif; ?>
<form method="POST" action="../models/auth/forgot_process.php" novalidate>
<input type="hidden" name="csrf" value="<?= htmlspecialchars($_SESSION['csrf'] ?? '') ?>">
<div class="mb-3">
<label for="login" class="form-label">Email or phone</label>
<input
type="text"
id="login"
name="login"
class="form-control"
placeholder="you@example.com"
value="<?= htmlspecialchars($prefill) ?>"
required
autocomplete="username"
>
</div>
<button class="w-100 btn btn-secure-primary btn-lg rounded-5" type="submit">Send reset code</button>
<div class="text-center mt-2">
<a class="text-decoration-none" href="/auth/reset.php">Already have a code?</a>
</div>
<div class="text-center mt-3">
<a href="/auth/login.php" class="text-decoration-none">Back to login</a>
</div>
</form>
</div>
</div>
</div>
<?php include __DIR__ . '/footer.php'; ?>
Выполнить команду
Для локальной разработки. Не используйте в интернете!