diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..cb77e89
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,6 @@
+{
+ "name": "Projet-Dev-Web-Ing1",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {}
+}
diff --git a/projet_admin/css/styles.css b/projet_admin/css/styles.css
new file mode 100644
index 0000000..823c0e6
--- /dev/null
+++ b/projet_admin/css/styles.css
@@ -0,0 +1,256 @@
+/* General Reset */
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: Arial, sans-serif;
+ background-color: #f4f4f4;
+}
+
+/* Container */
+.container {
+ display: flex;
+ height: 100vh;
+}
+
+/* Sidebar */
+.sidebar h2 {
+ text-align: center;
+ margin-bottom: 20px;
+}
+
+.sidebar nav ul {
+ list-style: none;
+}
+
+.sidebar nav ul li {
+ margin: 15px 0;
+}
+
+.sidebar nav ul li a {
+ color: #fff;
+ text-decoration: none;
+ padding: 10px;
+ display: block;
+ border-radius: 5px;
+}
+
+.sidebar nav ul li a:hover {
+ background-color: #555;
+}
+
+/* Main Content */
+.main-content {
+ flex-grow: 1;
+ padding: 20px;
+ background-color: #fff;
+ overflow-y: auto;
+}
+
+header {
+ margin-bottom: 20px;
+}
+
+header h1 {
+ margin-bottom: 10px;
+}
+
+/* Cards Section */
+.cards {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
+ gap: 20px;
+}
+
+.card {
+ background: #e3e3e3;
+ padding: 20px;
+ border-radius: 8px;
+ text-align: center;
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
+}
+
+.card h3 {
+ margin-bottom: 10px;
+}
+
+/* Media Query for Responsive Design */
+@media (max-width: 768px) {
+ .sidebar {
+ width: 70px;
+ text-align: center;
+ }
+
+ .sidebar h2 {
+ font-size: 16px;
+ }
+
+ .sidebar nav ul li {
+ margin: 10px 0;
+ }
+
+ .sidebar nav ul li a {
+ padding: 5px;
+ }
+
+ .main-content {
+ padding: 10px;
+ }
+}
+
+/* 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;
+}
+
+.action-button {
+ background-color: #dc3545;
+ color: white;
+ border: none;
+ padding: 5px 10px;
+ border-radius: 5px;
+ cursor: pointer;
+}
+
+.action-button:hover {
+ background-color: #c82333;
+}
+
+/* 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, .adjust-points-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;
+}
+
+/* Add this to your existing CSS */
+
+/* User Logs Section */
+.user-logs {
+ margin-top: 40px;
+}
+
+.log-table {
+ width: 100%;
+ border-collapse: collapse;
+}
+
+.log-table th, .log-table td {
+ padding: 10px;
+ border: 1px solid #ccc;
+ text-align: left;
+}
+
+.log-table th {
+ background-color: #f4f4f4;
+}
\ No newline at end of file
diff --git a/projet_admin/database/logs.json b/projet_admin/database/logs.json
new file mode 100644
index 0000000..e69de29
diff --git a/projet_admin/database/points.json b/projet_admin/database/points.json
new file mode 100644
index 0000000..e69de29
diff --git a/projet_admin/database/users.json b/projet_admin/database/users.json
new file mode 100644
index 0000000..e69de29
diff --git a/projet_admin/http/User.php b/projet_admin/http/User.php
new file mode 100644
index 0000000..7ffa2c6
--- /dev/null
+++ b/projet_admin/http/User.php
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+ User
+
+
+
+
+
+
+
+
+
+
+
+
+ | Username |
+ Email |
+ Access Level |
+ Points |
+ Actions |
+
+
+
+
+
+
+
+ Login History and Action Logs
+
+
+
+ | Username |
+ Action |
+ Timestamp |
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projet_admin/http/frontend.php b/projet_admin/http/frontend.php
new file mode 100644
index 0000000..2fc4a58
--- /dev/null
+++ b/projet_admin/http/frontend.php
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ Admin Dashboard - User Management
+
+
+
+
+
+
+
+
+
+
diff --git a/projet_admin/http/index.js b/projet_admin/http/index.js
new file mode 100644
index 0000000..b1f539a
--- /dev/null
+++ b/projet_admin/http/index.js
@@ -0,0 +1,10 @@
+import { createRoot } from 'react-dom/client';
+
+function NavigationBar() {
+ // TODO: Actually implement a navigation bar
+ return Hello from React!
;
+}
+
+const domNode = document.getElementById('navigation');
+const root = createRoot(domNode);
+root.render();
diff --git a/projet_admin/http/sidebar.php b/projet_admin/http/sidebar.php
new file mode 100644
index 0000000..fb802e1
--- /dev/null
+++ b/projet_admin/http/sidebar.php
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/projet_admin/js/script.js b/projet_admin/js/script.js
new file mode 100644
index 0000000..3d61a5a
--- /dev/null
+++ b/projet_admin/js/script.js
@@ -0,0 +1,106 @@
+// script.js
+
+let users = [];
+let logs = [];
+
+document.getElementById('userForm').addEventListener('submit', function(event) {
+ event.preventDefault();
+
+ const username = document.getElementById('username').value;
+ const email = document.getElementById('email').value;
+
+ const user = {
+ id: Date.now(),
+ username: username,
+ email: email,
+ accessLevel: 'User', // Default access level
+ points: 0, // Default points
+ logins: [] // Array to track login timestamps
+ };
+
+ users.push(user);
+ logAction(username, 'User added');
+ renderUserList();
+ this.reset(); // Clear the form
+});
+
+function renderUserList() {
+ const userList = document.getElementById('userList');
+ userList.innerHTML = ''; // Clear the list before rendering
+
+ users.forEach((user) => {
+ const row = document.createElement('tr');
+ row.innerHTML = `
+ ${user.username} |
+ ${user.email} |
+
+
+ |
+
+ ${user.points}
+
+
+ |
+
+
+ |
+ `;
+ userList.appendChild(row);
+ });
+}
+
+function deleteUser(userId) {
+ const user = users.find(user => user.id === userId);
+ if (user) {
+ logAction(user.username, 'User deleted');
+ }
+ users = users.filter(user => user.id !== userId);
+ renderUserList();
+}
+
+function changeAccessLevel(userId, newLevel) {
+ const user = users.find(user => user.id === userId);
+ if (user) {
+ const oldLevel = user.accessLevel;
+ user.accessLevel = newLevel;
+ logAction(user.username, `Access level changed from ${oldLevel} to ${newLevel}`);
+ }
+}
+
+function adjustPoints(userId) {
+ const inputField = document.getElementById(`points-${userId}`);
+ const pointsToAdd = parseInt(inputField.value) || 0;
+
+ const user = users.find(user => user.id === userId);
+ if (user) {
+ user.points += pointsToAdd; // Adjust points based on the input value
+ logAction(user.username, `Points adjusted by ${pointsToAdd}`);
+ inputField.value = ''; // Clear the input
+ renderUserList(); // Re-render the user list
+ }
+}
+
+function logAction(username, action) {
+ const timestamp = new Date().toLocaleString();
+ logs.push({username, action, timestamp});
+ renderLogList();
+}
+
+function renderLogList() {
+ const logList = document.getElementById('logList');
+ logList.innerHTML = ''; // Clear the list before rendering
+
+ logs.forEach(log => {
+ const row = document.createElement('tr');
+ row.innerHTML = `
+ ${log.username} |
+ ${log.action} |
+ ${log.timestamp} |
+ `;
+ logList.appendChild(row);
+ });
+}
\ No newline at end of file