commit version 22.12.12447

This commit is contained in:
2023-01-01 22:36:12 -05:00
parent af1b03d79f
commit b948283a96
744 changed files with 620715 additions and 27381 deletions

View File

@ -1,25 +1,28 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage web
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
*
*/
if ($_SESSION['userlevel'] == 10 && request_token_valid($vars)) // Only valid forms from level 10 users
{
if (strlen($vars['role_name']) &&
strlen($vars['role_descr']))
{
$oid_id = dbInsert('roles', array('role_descr' => $vars['role_descr'],
'role_name' => $vars['role_name'])
if ($_SESSION['userlevel'] == 10 && request_token_valid($vars)) { // Only valid forms from level 10 users
if (!safe_empty($vars['role_name']) &&
!safe_empty($vars['role_descr'])) {
$oid_id = dbInsert('roles', [ 'role_descr' => $vars['role_descr'],
'role_name' => $vars['role_name'] ]
);
if ($oid_id)
{
if ($oid_id) {
print_success("<strong>SUCCESS:</strong> Added role");
}
else
{
} else {
print_warning("<strong>WARNING:</strong> Role not added");
}
}
else
{
} else {
print_error("<strong>ERROR:</strong> All fields must be completed to add a new role.");
}
}