24if (!defined(
'NOTOKENRENEWAL')) {
25 define(
'NOTOKENRENEWAL',
'1');
27if (!defined(
'NOREQUIREMENU')) {
28 define(
'NOREQUIREMENU',
'1');
30if (!defined(
'NOREQUIREHTML')) {
31 define(
'NOREQUIREHTML',
'1');
33if (!defined(
'NOREQUIREAJAX')) {
34 define(
'NOREQUIREAJAX',
'1');
36if (!defined(
'NOREQUIRESOC')) {
37 define(
'NOREQUIRESOC',
'1');
39if (!defined(
'NOREQUIRETRAN')) {
40 define(
'NOREQUIRETRAN',
'1');
42if (!defined(
'CSRFCHECK_WITH_TOKEN')) {
43 define(
'CSRFCHECK_WITH_TOKEN',
'1');
47require
'../../main.inc.php';
48require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
50$action =
GETPOST(
'action',
'aZ09');
51$name =
GETPOST(
'name',
'alpha');
53$value = (
GETPOST(
'value',
'aZ09') !=
'' ?
GETPOST(
'value',
'aZ09') : 1);
58if (empty($user->admin) && empty($userconst)) {
68if (!empty($action) && !empty($name)) {
70 $tmpuser =
new User($db);
71 $tmpuser->id = $userconst;
72 if ($tmpuser->id == $user->id || $user->hasRight(
'user',
'user',
'creer')) {
73 if ($action ==
'set') {
75 } elseif ($action ==
'del') {
80 if ($action ==
'set') {
82 } elseif ($action ==
'del') {
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
Class to manage Dolibarr users.
dol_set_user_param($db, $conf, &$user, $tab)
Save personal parameter.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.