modified: templates/edit_giveaway.html modified: templates/edit_user.html new file: templates/footer.html modified: templates/global_admin_dashboard.html modified: templates/leaderboard.html modified: templates/logs.html modified: templates/redeem_giveaway.html modified: templates/server_admin_dashboard.html modified: templates/server_giveaways.html modified: templates/settings.html modified: templates/user_dashboard.html modified: templates/user_giveaways.html modified: templates/user_landing_page.html modified: templates/user_server_data.html modified: templates/users.html
63 lines
3.0 KiB
HTML
63 lines
3.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>User Management</title>
|
|
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
<div class="container mt-5">
|
|
<h1 class="text-center">User Management</h1>
|
|
<table class="table table-bordered mt-4">
|
|
<thead>
|
|
<tr>
|
|
<th>User id</th>
|
|
<th>Permission Level</th>
|
|
<th>Points</th>
|
|
<th>Ban Status</th>
|
|
<th>Points Management</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for user in users %}
|
|
<tr>
|
|
<td>{{ user.user_id }}</td>
|
|
<td>
|
|
<form action="{{ url_for('update_role', user_id=user.user_id) }}" method="POST">
|
|
<select name="permission" class="form-control">
|
|
<option value="0" {% if user.permission == 0 %}selected{% endif %}>User</option>
|
|
<option value="5" {% if user.permission == 5 %}selected{% endif %}>Mod</option>
|
|
<option value="8" {% if user.permission == 8 %}selected{% endif %}>Admin</option>
|
|
<option value="10" {% if user.permission == 10 %}selected{% endif %}>Owner</option>
|
|
</select>
|
|
<button type="submit" class="btn btn-primary mt-2">Update Role</button>
|
|
</form>
|
|
</td>
|
|
<td>{{ user.points }}</td>
|
|
<td>{{ "Banned" if user.ban else "Active" }}</td>
|
|
<td>
|
|
<form action="{{ url_for('update_points', user_id=user.user_id) }}" method="POST" class="form-inline">
|
|
<input type="number" name="points_change" class="form-control mr-2" placeholder="Change Points">
|
|
<button type="submit" class="btn btn-primary">Update</button>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<a href="{{ url_for('ban_user', user_id=user.user_id) }}" class="btn btn-danger">Ban</a>
|
|
<a href="{{ url_for('unban_user', user_id=user.user_id) }}" class="btn btn-success">Unban</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<a href="{{ url_for('admin_dashboard') }}" class="btn btn-secondary btn-block mt-3">Back to Dashboard</a>
|
|
</div>
|
|
|
|
{% include 'footer.html' %}
|
|
|
|
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|