tippspiel2027/tippspiel/src/Views/register.php

77 lines
2.9 KiB
PHP
Raw Normal View History

<?php
$pageTitle = 'Registrieren';
require __DIR__ . '/partials/header.php';
?>
<h1>Registrieren</h1>
2026-10-04 23:15:54 +02:00
<?php if (!empty($registrationClosed)): ?>
<p>Die Registrierung neuer Spieler ist derzeit geschlossen. Bitte wende dich an einen Administrator.</p>
<p><a href="/index.php?page=login">Zum Login</a></p>
<?php require __DIR__ . '/partials/footer.php'; return; ?>
<?php endif; ?>
<?php if (isset($error)): ?>
<p style="color: red;"><?php echo htmlspecialchars($error); ?></p>
<?php endif; ?>
<style>
.form-group {
margin-bottom: 1rem;
}
.form-group label {
display: inline-block;
width: 200px;
text-align: right;
margin-right: 10px;
}
.form-group button {
margin-left: calc(200px + 10px);
}
2026-10-27 12:59:45 +01:00
.form-hint {
margin: 0 0 1rem calc(200px + 10px);
color: var(--muted);
font-size: 0.9em;
}
</style>
<form action="/index.php?page=register" method="post">
<div class="form-group">
<label for="firstname">Vorname:</label>
<input type="text" id="firstname" name="firstname" value="<?php echo htmlspecialchars($_POST['firstname'] ?? ''); ?>" required>
</div>
<div class="form-group">
<label for="lastname">Nachname:</label>
<input type="text" id="lastname" name="lastname" value="<?php echo htmlspecialchars($_POST['lastname'] ?? ''); ?>" required>
</div>
<div class="form-group">
<label for="email">E-Mail:</label>
<input type="email" id="email" name="email" value="<?php echo htmlspecialchars($_POST['email'] ?? ''); ?>" required>
</div>
2026-10-27 12:59:45 +01:00
<div class="form-group">
<label for="mobile">Handynummer:</label>
<input type="tel" id="mobile" name="mobile" value="<?php echo htmlspecialchars($_POST['mobile'] ?? ''); ?>" required>
</div>
<div class="form-group">
<label for="iban">IBAN (oder PayPal):</label>
<input type="text" id="iban" name="iban" maxlength="34" value="<?php echo htmlspecialchars($_POST['iban'] ?? ''); ?>">
</div>
<div class="form-group">
<label for="paypal">PayPal (oder IBAN):</label>
<input type="text" id="paypal" name="paypal" maxlength="255" placeholder="E-Mail oder PayPal.Me-Link" value="<?php echo htmlspecialchars($_POST['paypal'] ?? ''); ?>">
</div>
<p class="form-hint">Bitte mindestens eine Zahlungsmöglichkeit angeben: IBAN oder PayPal.</p>
<div class="form-group">
<label for="password">Passwort:</label>
<input type="password" id="password" name="password" required>
</div>
<div class="form-group">
<label for="password_confirm">Passwort bestätigen:</label>
<input type="password" id="password_confirm" name="password_confirm" required>
</div>
<div class="form-group">
<button type="submit">Registrieren</button>
</div>
</form>
<?php require __DIR__ . '/partials/footer.php'; ?>