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');
40include
'../../main.inc.php';
43$element =
GETPOST(
'element',
'aZ09arobase');
44$htmlelement =
GETPOST(
'htmlelement',
'alpha');
45$type =
GETPOST(
'type',
'alpha');
50$module = $object->module;
51$element = $object->element;
52$usesublevelpermission = ($module != $element ? $element :
'');
53if ($usesublevelpermission && !isset($user->rights->$module->$element)) {
54 $usesublevelpermission =
'';
60$result =
restrictedArea($user, $object->module, $object, $object->table_element, $usesublevelpermission,
'fk_soc',
'rowid', 0, 1);
72print
'<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER[
"PHP_SELF"]).
'?'.
dol_escape_htmltag($_SERVER[
"QUERY_STRING"]).
' -->'.
"\n";
74if (!empty($id) && !empty($element) && !empty($htmlelement) && !empty($type)) {
75 $value =
GETPOST(
'value',
'alpha');
78 dol_syslog(
"AjaxSetExtraParameters id=".$id.
" element=".$element.
" htmlelement=".$htmlelement.
" type=".$type.
" value=".$value, LOG_DEBUG);
80 if (is_object($object)) {
81 $params[$htmlelement] = array($type => $value);
82 $object->extraparams = array_merge($object->extraparams, $params);
84 $result = $object->setExtraParameters();
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='')
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.
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.
httponly_accessforbidden($message=1, $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.