This commit is contained in:
2021-06-21 11:13:02 -04:00
parent 5e4b57ebad
commit 1cb2704c65
7 changed files with 237 additions and 210 deletions

View File

@@ -84,22 +84,25 @@
<?php if (isset($session_user)) { if($session_user["0"]["users_usertype"] !== "USER-TYPES-ADMIN") { header("Location: index.php"); ?><h2 class="content-subhead"><?php echo $transLang['NOT_AUTHORIZED']; ?></h2><?php } } ?>
<?php $minpasslength = $StaticFunctions->getMinPass(); ?>
<?php // FILTER POSTED DATA
$form_data = filter_input_array(INPUT_POST, [
'edituser' => (string)FILTER_SANITIZE_STRING,
'fd_editUserId' => (string)FILTER_SANITIZE_STRING,
'fd_initialPassword' => (string)FILTER_SANITIZE_STRING,
'fd_confirmPassword' => (string)FILTER_SANITIZE_STRING,
'fd_firstName' => (string)FILTER_SANITIZE_STRING,
'fd_lastName' => (string)FILTER_SANITIZE_STRING,
'fd_userEmail' => (string)FILTER_SANITIZE_STRING
]);
?>
<?php // PAGE CONSTANTS
$selfName = (string)'users.php'; // PAGE URL
$minpasslength = $StaticFunctions->getMinPass(); // MINIMUM PASSWORD LENGTH
?>
<?php
// FILTER POSTED DATA
$form_data = filter_input_array(INPUT_POST, [
'edituser' => (string)FILTER_SANITIZE_STRING,
'editid' => (string)FILTER_SANITIZE_STRING,
'form_data_passwordconfirm' => (string)FILTER_SANITIZE_STRING,
'form_data_firstname' => (string)FILTER_SANITIZE_STRING,
'form_data_lastname' => (string)FILTER_SANITIZE_STRING,
'form_data_email' => (string)FILTER_SANITIZE_STRING
]);
if (!empty($form_data['edituser'])) { $edituser = $Users->getUserInfo($form_data['editid'], "0", "0") ?>
if (!empty($form_data['edituser'])) { $edituser = $Users->getUserInfo($form_data['fd_editUserId'], "0", "0") ?>
<!-- USER EDIT SECTION -->
<div class="container-fluid">
<form method="post">
@@ -355,7 +358,7 @@ if (0 === $row_count): else: $page_count = (int)ceil($row_count / $StaticFunctio
<td class="nowrap">
<form method="post">
<input type="hidden" id="_METHOD" name="_METHOD" value="EDITUSER" />
<input type="hidden" id="editid" name="editid" value="<?php echo $row['users_id']; ?>" />
<input type="hidden" id="fd_editUserId" name="fd_editUserId" value="<?php echo $row['users_id']; ?>" />
<button class="btn btn-primary btn-sm" id="edituser" name="edituser" value="edituser" type="submit" <?php if ($row['users_username'] == "admin"): echo "disabled"; endif; if ($row['users_username'] == "KIOSK"): echo "disabled"; endif; ?>><i class="fa fa-edit"></i> </button>
</form>
<form method="post" onsubmit="return confirm('<?php echo $transLang['DELETE_WARNING']; ?>')">