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');
37include
'../../main.inc.php';
38include_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
42$objecttype =
GETPOST(
'objecttype',
'aZ09arobase');
44$params = array(
'fromajaxtooltip' => 1);
45if (GETPOSTISSET(
'infologin')) {
46 $params[
'infologin'] =
GETPOST(
'infologin',
'int');
48if (GETPOSTISSET(
'option')) {
49 $params[
'option'] =
GETPOST(
'option',
'restricthtml');
54if (empty($object->element)) {
58$module = $object->module;
59$element = $object->element;
61$usesublevelpermission = ($module != $element ? $element :
'');
62if ($usesublevelpermission && !$user->hasRight($module, $element)) {
63 $usesublevelpermission =
'';
69restrictedArea($user, $object->module, $object, $object->table_element, $usesublevelpermission);
80if (is_object($object)) {
81 if ($object->id > 0 || !empty($object->ref)) {
83 $html = $object->getTooltipContent($params);
84 } elseif ($res == 0) {
85 $html = $langs->trans(
'Deleted');
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.
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.