tippspiel2027/tippspiel/src/Views/settings.php

68 lines
2.7 KiB
PHP
Raw Normal View History

2026-10-04 23:15:54 +02:00
<?php
$pageTitle = 'Einstellungen';
require __DIR__ . '/partials/header.php';
?>
<h1>Spielerdaten</h1>
<?php if ($message): ?>
<p style="color: green;"><?php echo htmlspecialchars($message); ?></p>
<?php endif; ?>
<?php if ($error): ?>
<p style="color: red;"><?php echo htmlspecialchars($error); ?></p>
<?php endif; ?>
<form method="post" action="/index.php?page=settings" class="settings-form">
<div class="form-group">
<label for="name">Login:</label>
<input type="text" id="name" value="<?php echo htmlspecialchars($user['name']); ?>" readonly>
</div>
<div class="form-group">
<label for="firstname">Vorname:</label>
<input type="text" id="firstname" value="<?php echo htmlspecialchars($user['firstname']); ?>" readonly>
</div>
<div class="form-group">
<label for="lastname">Nachname:</label>
<input type="text" id="lastname" value="<?php echo htmlspecialchars($user['lastname']); ?>" readonly>
</div>
<div class="form-group">
<label for="iban">IBAN:</label>
<input type="text" id="iban" name="iban" maxlength="34" value="<?php echo htmlspecialchars((string)$user['iban']); ?>">
</div>
<div class="form-group">
2026-10-27 12:59:45 +01:00
<label for="paypal">PayPal:</label>
<input type="text" id="paypal" name="paypal" maxlength="255" placeholder="E-Mail oder PayPal.Me-Link" value="<?php echo htmlspecialchars((string)$user['paypal']); ?>">
2026-10-04 23:15:54 +02:00
</div>
<div class="form-group">
<label for="mobile">Handynummer:</label>
<input type="text" id="mobile" name="mobile" value="<?php echo htmlspecialchars((string)$user['mobile']); ?>">
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" id="email" name="email" class="wide" required value="<?php echo htmlspecialchars((string)$user['email']); ?>">
</div>
<div class="form-group">
<label for="gets_reminders">Erinnerungen:</label>
<input type="checkbox" id="gets_reminders" name="gets_reminders" value="1" <?php if (!empty($user['gets_reminders'])) echo 'checked'; ?>>
<label for="gets_reminders" class="inline">Ich möchte E-Mail-Erinnerungen erhalten</label>
</div>
<div class="form-group">
<button type="submit">Ok</button>
</div>
</form>
<style>
.settings-form .form-group { margin-bottom: 0.8rem; }
.settings-form .form-group > label:first-child { display: inline-block; width: 160px; }
.settings-form label.inline { width: auto; }
.settings-form input[readonly] { background: #f4f4f4; color: #666; border: 1px solid #ccc; }
.settings-form input.wide { width: 25em; max-width: 100%; }
.settings-form button { margin-left: 164px; }
</style>
<?php require __DIR__ . '/partials/footer.php'; ?>