zkt26/projet_admin/http/User.php
2025-04-08 10:08:52 +02:00

132 lines
3.3 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/styles.css">
<title>User</title>
<style>
/* Add this to your existing CSS */
/* User Management Section */
.user-management {
margin-top: 20px;
}
.user-form {
display: grid;
grid-template-columns: 1fr 1fr auto;
gap: 10px;
margin-bottom: 20px;
}
.user-form input {
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}
.user-form button {
padding: 10px;
background-color: #28a745;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
.user-form button:hover {
background-color: #218838;
}
.user-table {
width: 100%;
border-collapse: collapse;
}
.user-table th,
.user-table td {
padding: 10px;
border: 1px solid #ccc;
text-align: left;
}
.user-table th {
background-color: #f4f4f4;
}
.access-level {
margin-right: 10px;
}
.assign-button,
.revoke-button {
background-color: #007bff;
color: white;
border: none;
padding: 5px 10px;
border-radius: 5px;
cursor: pointer;
}
.assign-button:hover {
background-color: #0069d9;
}
.revoke-button {
background-color: #dc3545;
}
.revoke-button:hover {
background-color: #c82333;
}
</style>
</head>
<?php include("sidebar.php"); ?>
<body>
<main class="main-content">
<header>
<h1>User Management</h1>
<p>Manage users from this panel.</p>
</header>
<section class="user-management">
<form id="userForm" class="user-form">
<input type="text" id="username" placeholder="Username" required>
<input type="email" id="email" placeholder="Email" required>
<button type="submit">Add User</button>
</form>
<table class="user-table">
<thead>
<tr>
<th>Username</th>
<th>Email</th>
<th>Access Level</th>
<th>Points</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="userList">
</tbody>
</table>
</section>
<section class="user-logs">
<h2>Login History and Action Logs</h2>
<table class="log-table">
<thead>
<tr>
<th>Username</th>
<th>Action</th>
<th>Timestamp</th>
</tr>
</thead>
<tbody id="logList">
</tbody>
</table>
</section>
</main>
</body>
<script src="../js/script.js"></script>
</html>