25if (!defined(
'NOTOKENRENEWAL')) {
26 define(
'NOTOKENRENEWAL',
'1');
28if (!defined(
'NOREQUIREMENU')) {
29 define(
'NOREQUIREMENU',
'1');
31if (!defined(
'NOREQUIREHTML')) {
32 define(
'NOREQUIREHTML',
'1');
34if (!defined(
'NOREQUIREAJAX')) {
35 define(
'NOREQUIREAJAX',
'1');
37if (!defined(
'NOREQUIRESOC')) {
38 define(
'NOREQUIRESOC',
'1');
41include
'../../main.inc.php';
44$element =
GETPOST(
'element',
'aZ09arobase');
45$htmlelement =
GETPOST(
'htmlelement',
'alpha');
46$type =
GETPOST(
'type',
'alpha');
53$usesublevelpermission = ($module != $element ? $element :
'');
54if ($usesublevelpermission && !$user->hasRight($module, $element)) {
55 $usesublevelpermission =
'';
73print
'<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER[
"PHP_SELF"]).
'?'.
dol_escape_htmltag($_SERVER[
"QUERY_STRING"]).
' -->'.
"\n";
75if (!empty($id) && !empty($element) && !empty($htmlelement) && !empty($type)) {
76 $value =
GETPOST(
'value',
'alpha');
79 dol_syslog(
"AjaxSetExtraParameters id=".
$id.
" element=".$element.
" htmlelement=".$htmlelement.
" type=".$type.
" value=".$value, LOG_DEBUG);
81 if (is_object($object)) {
82 '@phan-var-force CommonObject $object';
83 $params[$htmlelement] = array($type => $value);
86 $result =
$object->setExtraParameters();
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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.
fetchObjectByElement($element_id, $element_type, $element_ref='', $useCache=0, $maxCacheByType=10)
Fetch an object from its id and element_type Inclusion of classes is automatic.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
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.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.