<?php
require_once __DIR__.'/../app/bootstrap.php';
csrf_check();
$message=''; $ok=false;
$email = $_SESSION['pending_verification_email'] ?? ($_POST['email'] ?? '');
if($_SERVER['REQUEST_METHOD']==='POST'){
    $ok = resend_verification($pdo, $config, $_POST['email'] ?? '');
    $message = 'Falls ein unbestätigtes Konto existiert, wurde ein neuer Bestätigungslink versendet.';
}
?><!doctype html><html lang="de"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Bestätigung erneut senden · KuhRator</title><link rel="stylesheet" href="../public/assets/style.css"><script nonce="<?= e(qrmanager_csp_nonce()) ?>" src="../public/assets/admin.js" defer></script></head><body><main class="login auth-screen"><form method="post" class="card formgrid auth-card"><div class="auth-logo"><img src="../public/assets/qrator-logo.png" alt="KuhRator Logo"></div><h1>Bestätigungslink senden</h1><?php if($message): ?><p class="notice ok"><?= e($message) ?></p><?php endif; ?><input type="hidden" name="csrf" value="<?= e(csrf_token()) ?>"><label>E-Mail<input name="email" type="email" required value="<?= e($email) ?>"></label><button class="btn">Link senden</button><p><a href="login.php">Zurück zum Login</a></p></form></main></body></html>
