implemented admin control panel with the ability to delete articles/users in bulk, and open user panels with the standard options to reset passwords, change email/usernames, or delete. additionally, updated SQL schema, created dummy data, and fixed some bugs.

This commit is contained in:
Joshua Ashton
2025-03-30 17:01:29 -06:00
parent 86823cbd3e
commit e6735a9a20
18 changed files with 414 additions and 61 deletions
+4 -4
View File
@@ -42,7 +42,7 @@ if (isset($_POST['form_id'])) {
case 'reset_pw_form':
$msg = reset_password(
$_COOKIE['user_id'],
($_COOKIE['role_id'] <= 2 && $_COOKIE['user_id'] != $_POST['user_id'] ? $_POST['user_id'] : $_COOKIE['user_id']),
$_POST['new_pw'],
$_POST['verify_new_pw']
);
@@ -53,7 +53,7 @@ if (isset($_POST['form_id'])) {
case 'update_email_form':
$msg = update_email(
$_COOKIE['user_id'],
($_COOKIE['role_id'] <= 2 && $_COOKIE['user_id'] != $_POST['user_id'] ? $_POST['user_id'] : $_COOKIE['user_id']),
$_POST['new_email'],
$_POST['verify_new_email']
);
@@ -64,7 +64,7 @@ if (isset($_POST['form_id'])) {
case 'update_username_form':
$msg = update_username(
$_COOKIE['user_id'],
($_COOKIE['role_id'] <= 2 && $_COOKIE['user_id'] != $_POST['user_id'] ? $_POST['user_id'] : $_COOKIE['user_id']),
$_POST['new_username'],
$_POST['verify_new_username']
);
@@ -75,7 +75,7 @@ if (isset($_POST['form_id'])) {
case 'delete_account_form':
$msg = delete_account(
$_COOKIE['user_id'],
($_COOKIE['role_id'] <= 2 && $_COOKIE['user_id'] != $_POST['user_id'] ? $_POST['user_id'] : $_COOKIE['user_id']),
$_POST['delete_password'],
$_POST['delete_verify_password']
);