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:
@@ -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']
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user