umfassende updates
This commit is contained in:
parent
3331f08091
commit
50cd802d33
16 changed files with 441 additions and 78 deletions
|
|
@ -12,38 +12,35 @@ require __DIR__ . '/../partials/header.php';
|
|||
<p style="color: red;"><?php echo htmlspecialchars($error); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Form for creating/editing a user -->
|
||||
<h2><?php echo $editUser ? 'Benutzer bearbeiten' : 'Neuen Benutzer anlegen'; ?></h2>
|
||||
<!-- Form for editing a user -->
|
||||
<?php if ($editUser): ?>
|
||||
<h2>Benutzer bearbeiten</h2>
|
||||
<form action="/index.php?page=admin_users" method="post">
|
||||
<?php if ($editUser): ?>
|
||||
<input type="hidden" name="action" value="update">
|
||||
<input type="hidden" name="id" value="<?php echo htmlspecialchars($editUser['id']); ?>">
|
||||
<?php else: ?>
|
||||
<input type="hidden" name="action" value="create">
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="action" value="update">
|
||||
<input type="hidden" name="id" value="<?php echo htmlspecialchars($editUser['id']); ?>">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="firstname">Vorname:</label>
|
||||
<input type="text" id="firstname" name="firstname" value="<?php echo htmlspecialchars($editUser['firstname'] ?? ''); ?>" required>
|
||||
<input type="text" id="firstname" name="firstname" value="<?php echo htmlspecialchars($editUser['firstname']); ?>" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lastname">Nachname:</label>
|
||||
<input type="text" id="lastname" name="lastname" value="<?php echo htmlspecialchars($editUser['lastname'] ?? ''); ?>" required>
|
||||
<input type="text" id="lastname" name="lastname" value="<?php echo htmlspecialchars($editUser['lastname']); ?>" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">E-Mail:</label>
|
||||
<input type="email" id="email" name="email" value="<?php echo htmlspecialchars($editUser['email'] ?? ''); ?>" required>
|
||||
<input type="email" id="email" name="email" value="<?php echo htmlspecialchars($editUser['email']); ?>" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Passwort:</label>
|
||||
<input type="password" id="password" name="password" placeholder="<?php echo $editUser ? 'Leer lassen, um nicht zu ändern' : ''; ?>">
|
||||
<input type="password" id="password" name="password" placeholder="Leer lassen, um nicht zu ändern">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="admin">Admin:</label>
|
||||
<input type="checkbox" id="admin" name="admin" value="1" <?php echo !empty($editUser['admin']) ? 'checked' : ''; ?>>
|
||||
</div>
|
||||
|
||||
<?php if ($editUser && !empty($currentSeason)): ?>
|
||||
<?php if (!empty($currentSeason)): ?>
|
||||
<div class="form-group">
|
||||
<label for="has_paid">Bezahlt (<?php echo htmlspecialchars($currentSeason['name']); ?>):</label>
|
||||
<input type="checkbox" id="has_paid" name="has_paid" value="1" <?php echo isset($payments[$editUser['id']]) ? 'checked' : ''; ?>>
|
||||
|
|
@ -51,14 +48,13 @@ require __DIR__ . '/../partials/header.php';
|
|||
<?php endif; ?>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit"><?php echo $editUser ? 'Speichern' : 'Anlegen'; ?></button>
|
||||
<?php if ($editUser): ?>
|
||||
<a href="/index.php?page=admin_users">Abbrechen</a>
|
||||
<?php endif; ?>
|
||||
<button type="submit">Speichern</button>
|
||||
<a href="/index.php?page=admin_users">Abbrechen</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- User List -->
|
||||
<h2>Benutzerliste</h2>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue