partially implemented todo tracker

This commit is contained in:
2025-04-20 17:05:41 -06:00
parent 9e47110758
commit ab30859446
29 changed files with 546 additions and 157 deletions
+10 -10
View File
@@ -1,16 +1,16 @@
<?php
function admin_user_view()
{
$display = '
$display = '
<div class="view_card">
<div class="row">
<div class="row_space_between">
<h3>Users</h3>
<a href="admin.php?view=articles">View Articles</a>
</div>
<div class="line"></div>
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="form_id" value="users">
<div class="row">
<div class="row_space_between">
<label for="delete" class="form_checkbox_container">Delete
<input type="radio" class="button" name="action" id="delete" value="delete">
<span class="checkmark"></span>
@@ -36,11 +36,11 @@ function admin_user_view()
<th>Profile Picture</th>
</tr>
';
$conn = get_connection();
$results = $conn->query('SELECT user_id, username, email, last_active, role, created_at, is_active, profile_picture FROM user INNER JOIN roles ON user.role_id = roles.role_id;');
$conn = get_connection();
$results = $conn->query('SELECT user_id, username, email, last_active, role, created_at, is_active, profile_picture FROM user INNER JOIN roles ON user.role_id = roles.role_id;');
foreach ($results as $key => $result) {
$display .= '
foreach ($results as $key => $result) {
$display .= '
<tr data-href="user.php?action=view&user_id=' . $result['user_id'] . '">
<td class="excluded_cell">
<label class="form_checkbox_container">
@@ -58,14 +58,14 @@ function admin_user_view()
<td><img src="' . $_ENV['PROFILE_IMAGES_PQ_PATH'] . $result['profile_picture'] . '" class="card_profile_picture"></td>
</tr>
';
}
}
$display .= '
$display .= '
</table>
</form>
</div>
';
return $display;
return $display;
}