Implement node flags

This commit is contained in:
2023-03-07 14:56:32 +01:00
parent 78b97c5094
commit bfbdc16036
15 changed files with 200 additions and 38 deletions

View File

@@ -61,13 +61,14 @@ switch ($submit = form_get_action()) {
$role_manage = sanitize($_POST['role_manage']);
$role_admin = sanitize($_POST['role_admin']);
// construct menu set
// construct role set
$role = array();
if ($role_add) $role[] = 'add';
if ($role_edit) $role[] = 'edit';
if ($role_delete) $role[] = 'delete';
if ($role_manage) $role[] = 'manage';
if ($role_admin) $role[] = 'admin';
$role = empty($role) ? NULL : implode(',', $role);
$sql = "UPDATE user SET
user_name=?, user_displayname=?, user_realm=?,
@@ -75,7 +76,7 @@ switch ($submit = form_get_action()) {
WHERE user_id=?";
$sth = $dbh->prepare($sql);
$sth->execute([$user_name ,$user_displayname, $user_realm,
implode(',', $role), $id]);
$role, $id]);
$action = ACT_VIEW;
break;