except remember user, changed all cookies to sessions.

This commit is contained in:
2025-04-13 20:07:07 -06:00
parent 006cffef38
commit 3ef61e1c9e
24 changed files with 42 additions and 158 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ function request_role_change_form()
while ($row = $result->fetch_assoc()) {
$roles .= '
<label class="form_checkbox_container">' . $row['role'] . '
<input name="requested_role" value="' . $row['role_id'] . '" type="radio"' . ($row['role_id'] == $_COOKIE['role_id'] ? ' checked' : '') . '>
<input name="requested_role" value="' . $row['role_id'] . '" type="radio"' . ($row['role_id'] == $_SESSION['role_id'] ? ' checked' : '') . '>
<span class="checkmark"></span>
</label>
';
+1 -1
View File
@@ -19,7 +19,7 @@ function user_view($user_id)
// TODO: Allow user to update profile picture.
// <button id="update_profile_picture_form_button" class="modal_button underline">Update Profile Picture</button>
// <div id="update_profile_picture_form" class="modal_form">' . update_profile_picture_form() . '</div>
if ((isset($_COOKIE['user_id']) && $_COOKIE['user_id'] == $user_id) || (isset($_COOKIE['role_id']) && $_COOKIE['role_id'] <= 2)) {
if ((isset($_SESSION['user_id']) && $_SESSION['user_id'] == $user_id) || (isset($_SESSION['role_id']) && $_SESSION['role_id'] <= 2)) {
$view .= '
<h3>User Actions</h3>
<div class="user_actions">