31require
'../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.
'/resource/class/dolresource.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/fichinter/class/fichinter.class.php';
36 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
37 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
40 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
52$langs->loadLangs(array(
'resource',
'other',
'interventions'));
62$hookmanager->initHooks(array(
'element_resource'));
63$object->available_resources = array(
'dolresource');
68$element_ref =
GETPOST(
'ref',
'alpha');
69$element =
GETPOST(
'element',
'alpha');
70$action =
GETPOST(
'action',
'alpha');
71$mode =
GETPOST(
'mode',
'alpha');
74$resource_type =
GETPOST(
'resource_type',
'alpha');
77$cancel =
GETPOST(
'cancel',
'alpha');
78$confirm =
GETPOST(
'confirm',
'alpha');
81if (empty($mandatory)) {
93if (!$user->hasRight(
'resource',
'read')) {
98if ($element ==
'action') {
99 $result =
restrictedArea($user,
'agenda', $element_id,
'actioncomm&societe',
'myactions|allactions',
'fk_soc',
'id');
101if ($element ==
'fichinter') {
102 $result =
restrictedArea($user,
'ficheinter', $element_id,
'fichinter');
104if ($element ==
'product' || $element ==
'service') {
106 $tmpobject->fetch($element_id);
107 $fieldtype = $tmpobject->type;
108 $result =
restrictedArea($user,
'produit|service', $element_id,
'product&product',
'',
'', (
string) $fieldtype);
114$permissiontoadd = $user->hasRight(
'resource',
'write');
115$permissiontodelete = $user->hasRight(
'resource',
'delete');
122$parameters = array(
'resource_id' => $resource_id);
123$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
128if (empty($reshook)) {
132 if ($action ==
'add_element_resource' && !$cancel && $permissiontoadd) {
134 if (!($resource_id > 0)) {
136 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Resource")),
null,
'errors');
139 $objstat = fetchObjectByElement($element_id, $element, $element_ref);
140 $objstat->element = $element;
144 if (
getDolGlobalString(
'RESOURCE_USED_IN_EVENT_CHECK') && $objstat->element ==
'action' && $resource_type ==
'dolresource' && intval($busy) == 1) {
146 '@phan-var-force ActionComm $objstat';
147 $eventDateStart = $objstat->datep;
148 $eventDateEnd = $objstat->datef;
149 $isFullDayEvent = $objstat->fulldayevent;
150 if (empty($eventDateEnd)) {
151 if ($isFullDayEvent) {
153 $eventDateStart =
dol_mktime(0, 0, 0, $eventDateStartArr[
'mon'], $eventDateStartArr[
'mday'], $eventDateStartArr[
'year']);
154 $eventDateEnd =
dol_mktime(23, 59, 59, $eventDateStartArr[
'mon'], $eventDateStartArr[
'mday'], $eventDateStartArr[
'year']);
158 $sql =
"SELECT er.rowid, r.ref as r_ref, ac.id as ac_id, ac.label as ac_label";
159 $sql .=
" FROM ".MAIN_DB_PREFIX.
"element_resources as er";
160 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"resource as r ON r.rowid = er.resource_id AND er.resource_type = '".$db->escape($resource_type).
"'";
161 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"actioncomm as ac ON ac.id = er.element_id AND er.element_type = '".$db->escape($objstat->element).
"'";
162 $sql .=
" WHERE er.resource_id = ".((int) $resource_id);
163 $sql .=
" AND er.busy = 1";
167 $sql .=
" (ac.datep <= '".$db->idate($eventDateStart).
"' AND (ac.datep2 IS NULL OR ac.datep2 >= '".$db->idate($eventDateStart).
"'))";
169 if (!empty($eventDateEnd)) {
170 $sql .=
" OR (ac.datep <= '".$db->idate($eventDateEnd).
"' AND (ac.datep2 >= '".$db->idate($eventDateEnd).
"'))";
174 $sql .=
"ac.datep >= '".$db->idate($eventDateStart).
"'";
175 if (!empty($eventDateEnd)) {
176 $sql .=
" AND (ac.datep2 IS NOT NULL AND ac.datep2 <= '".$db->idate($eventDateEnd).
"')";
181 $resql = $db->query($sql);
184 $objstat->error = $db->lasterror();
185 $objstat->errors[] = $objstat->error;
187 if ($db->num_rows($resql) > 0) {
190 $objstat->error = $langs->trans(
'ErrorResourcesAlreadyInUse').
' : ';
191 while ($obj = $db->fetch_object($resql)) {
192 $objstat->error .=
'<br> - '.$langs->trans(
'ErrorResourceUseInEvent', $obj->r_ref, $obj->ac_label.
' ['.$obj->ac_id.
']');
194 $objstat->errors[] = $objstat->error;
201 $res = $objstat->add_element_resource($resource_id, $resource_type, $busy, $mandatory);
205 if (!$error && $res > 0 && is_object($objstat)) {
206 setEventMessages($langs->trans(
'ResourceLinkedWithSuccess'),
null,
'mesgs');
207 header(
"Location: ".$_SERVER[
'PHP_SELF'].
'?element='.$element.
'&element_id='.$objstat->id);
209 } elseif ($objstat) {
215 if ($action ==
'update_linked_resource' && $permissiontoadd && !$cancel) {
216 $res =
$object->fetchElementResource($lineid);
219 $object->mandatory = $mandatory;
222 $eventDateStart =
$object->objelement->datep;
223 $eventDateEnd =
$object->objelement->datef;
224 $isFullDayEvent =
$object->objelement->fulldayevent;
225 if (empty($eventDateEnd)) {
226 if ($isFullDayEvent) {
228 $eventDateStart =
dol_mktime(0, 0, 0, $eventDateStartArr[
'mon'], $eventDateStartArr[
'mday'], $eventDateStartArr[
'year']);
229 $eventDateEnd =
dol_mktime(23, 59, 59, $eventDateStartArr[
'mon'], $eventDateStartArr[
'mday'], $eventDateStartArr[
'year']);
233 $sql =
"SELECT er.rowid, r.ref as r_ref, ac.id as ac_id, ac.label as ac_label";
234 $sql .=
" FROM ".MAIN_DB_PREFIX.
"element_resources as er";
235 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"resource as r ON r.rowid = er.resource_id AND er.resource_type = '".$db->escape(
$object->resource_type).
"'";
236 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"actioncomm as ac ON ac.id = er.element_id AND er.element_type = '".$db->escape(
$object->element_type).
"'";
237 $sql .=
" WHERE er.resource_id = ".((int)
$object->resource_id);
238 $sql .=
" AND ac.id <> ".((int)
$object->element_id);
239 $sql .=
" AND er.busy = 1";
243 $sql .=
" (ac.datep <= '".$db->idate($eventDateStart).
"' AND (ac.datep2 IS NULL OR ac.datep2 >= '".$db->idate($eventDateStart).
"'))";
245 if (!empty($eventDateEnd)) {
246 $sql .=
" OR (ac.datep <= '".$db->idate($eventDateEnd).
"' AND (ac.datep2 IS NULL OR ac.datep2 >= '".$db->idate($eventDateEnd).
"'))";
250 $sql .=
"ac.datep >= '".$db->idate($eventDateStart).
"'";
251 if (!empty($eventDateEnd)) {
252 $sql .=
" AND (ac.datep2 IS NOT NULL AND ac.datep2 <= '".$db->idate($eventDateEnd).
"')";
257 $resql = $db->query($sql);
260 $object->error = $db->lasterror();
263 if ($db->num_rows($resql) > 0) {
266 $object->error = $langs->trans(
'ErrorResourcesAlreadyInUse').
' : ';
267 while ($obj = $db->fetch_object($resql)) {
268 $object->error .=
'<br> - '.$langs->trans(
'ErrorResourceUseInEvent', $obj->r_ref, $obj->ac_label.
' ['.$obj->ac_id.
']');
277 $result =
$object->updateElementResource($user);
286 setEventMessages($langs->trans(
'RessourceLineSuccessfullyUpdated'),
null,
'mesgs');
287 header(
"Location: ".$_SERVER[
'PHP_SELF'].
"?element=".$element.
"&element_id=".$element_id);
294 if ($action ==
'confirm_delete_linked_resource' && $permissiontodelete && $confirm ===
'yes') {
295 $res =
$object->fetchElementResource($lineid);
297 $result =
$object->objelement->delete_resource($lineid,
'');
300 setEventMessages($langs->trans(
'RessourceLineSuccessfullyDeleted'),
null,
'mesgs');
301 header(
"Location: ".$_SERVER[
'PHP_SELF'].
"?element=".$element.
"&element_id=".$element_id);
312$parameters = array(
'resource_id' => $resource_id);
313$reshook = $hookmanager->executeHooks(
'getElementResources', $parameters, $object, $action);
324$form =
new Form($db);
326$pagetitle = $langs->trans(
'ResourceElementPage');
328llxHeader(
'', $pagetitle, $help_url,
'', 0, 0,
'',
'',
'',
'mod-resource page-element_resource');
331$delay_warning =
getDolGlobalInt(
'MAIN_DELAY_ACTIONS_TODO') * 24 * 60 * 60;
334$ret = count(
$object->available_resources);
340 print
'<div class="warning">'.$langs->trans(
'NoResourceInDatabase').
'</div>';
343 if ($action ==
'delete_resource') {
344 print $form->formconfirm(
"element_resource.php?element=".$element.
"&element_id=".$element_id.
"&id=".
$id.
"&lineid=".$lineid, $langs->trans(
"DeleteResource"), $langs->trans(
"ConfirmDeleteResourceElement"),
"confirm_delete_linked_resource",
'',
'', 1);
349 if (($element_id || $element_ref) && $element ==
'action') {
350 require_once DOL_DOCUMENT_ROOT.
'/core/lib/agenda.lib.php';
353 $hookmanager->initHooks(array(
'actioncard',
'globalcard'));
355 $act = fetchObjectByElement($element_id, $element, $element_ref);
356 if (is_object($act)) {
357 '@phan-var-force ActionComm $act';
362 $linkback =
'<a href="'.DOL_URL_ROOT.
'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
363 $linkback .=
img_picto($langs->trans(
"BackToList"),
'object_calendarlist',
'class="pictoactionview pictofixedwidth"');
364 $linkback .=
'<span class="hideonsmartphone">'.$langs->trans(
"BackToList").
'</span>';
369 $out .=
'</li><li class="noborder litext">';
371 $out .=
img_picto($langs->trans(
"ViewCal"),
'object_calendar',
'class="pictofixedwidth pictoactionview"');
372 $out .=
'<span class="hideonsmartphone">'.$langs->trans(
"ViewCal").
'</span>';
374 $out .=
'</li><li class="noborder litext">';
376 $out .=
img_picto($langs->trans(
"ViewWeek"),
'object_calendarweek',
'class="pictofixedwidth pictoactionview"');
377 $out .=
'<span class="hideonsmartphone">'.$langs->trans(
"ViewWeek").
'</span>';
379 $out .=
'</li><li class="noborder litext">';
381 $out .=
img_picto($langs->trans(
"ViewDay"),
'object_calendarday',
'class="pictofixedwidth pictoactionview"');
382 $out .=
'<span class="hideonsmartphone">'.$langs->trans(
"ViewDay").
'</span>';
384 $out .=
'</li><li class="noborder litext">';
385 $out .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/peruser.php?mode=show_peruser&year='.
dol_print_date($act->datep,
'%Y').
'&month='.
dol_print_date($act->datep,
'%m').
'&day='.
dol_print_date($act->datep,
'%d').
'">';
386 $out .=
img_picto($langs->trans(
"ViewPerUser"),
'object_calendarperuser',
'class="pictofixedwidth pictoactionview"');
387 $out .=
'<span class="hideonsmartphone">'.$langs->trans(
"ViewPerUser").
'</span>';
391 $parameters = array();
392 $reshook = $hookmanager->executeHooks(
'addCalendarView', $parameters, $object, $action);
393 if (empty($reshook)) {
394 $out .= $hookmanager->resPrint;
395 } elseif ($reshook > 1) {
396 $out = $hookmanager->resPrint;
401 $morehtmlref =
'<div class="refidno">';
408 $langs->load(
"projects");
411 $morehtmlref .=
img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
412 if ($action !=
'classify') {
413 $morehtmlref .=
'<a class="editfielda" href="'.dolBuildUrl($_SERVER[
'PHP_SELF'], [
'action' =>
'classify',
'id' =>
$object->id],
true).
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
415 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.
$object->id,
$object->socid, (
string)
$object->fk_project, ($action ==
'classify' ?
'projectid' :
'none'), 0, 0, 0, 1,
'',
'maxwidth300');
417 if (!empty(
$object->fk_project)) {
419 $proj->fetch(
$object->fk_project);
420 $morehtmlref .= $proj->getNomUrl(1);
422 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
428 $morehtmlref .=
'</div>';
430 dol_banner_tab($act,
'element_id', $linkback, ($user->socid ? 0 : 1),
'id',
'ref', $morehtmlref,
'&element='.$element, 0,
'',
'');
432 print
'<div class="fichecenter">';
434 print
'<div class="underbanner clearboth"></div>';
436 print
'<table class="border tableforfield centpercent">';
440 print
'<tr><td class="titlefield">'.$langs->trans(
"Type").
'</td><td>';
441 print $act->getTypePicto();
442 print $langs->trans(
"Action".$act->type_code);
447 print
'<tr><td class="titlefield">'.$langs->trans(
"EventOnFullDay").
'</td><td colspan="3">'.
yn($act->fulldayevent ? 1 : 0, 3).
'</td></tr>';
450 print
'<tr><td>'.$langs->trans(
"DateActionStart").
'</td><td colspan="3">';
451 if (empty($act->fulldayevent)) {
455 print
dol_print_date($act->datep,
'day', ($tzforfullday ? $tzforfullday :
'tzuser'));
457 if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) {
464 print
'<tr><td>'.$langs->trans(
"DateActionEnd").
'</td><td colspan="3">';
465 if (empty($act->fulldayevent)) {
469 print
dol_print_date($act->datef,
'day', ($tzforfullday ? $tzforfullday :
'tzuser'));
471 if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now - $delay_warning)) {
478 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td colspan="3">'.$act->location.
'</td></tr>';
482 print
'<tr><td class="nowrap">'.$langs->trans(
"ActionAffectedTo").
'</td><td colspan="3">';
483 $listofuserid = array();
484 if (empty($donotclearsession)) {
485 if ($act->userownerid > 0) {
486 $listofuserid[$act->userownerid] = array(
'id' => $act->userownerid,
'transparency' => $act->transparency);
488 if (!empty($act->userassigned)) {
490 $tmplist1 = $act->userassigned;
492 foreach ($tmplist1 as $key => $val) {
493 if ($val[
'id'] && $val[
'id'] != $act->userownerid) {
494 $listofuserid[$val[
'id']] = $val;
498 $_SESSION[
'assignedtouser'] = json_encode($listofuserid);
500 if (!empty($_SESSION[
'assignedtouser'])) {
501 $listofuserid = json_decode($_SESSION[
'assignedtouser'],
true);
504 $listofcontactid = array();
505 $listofotherid = array();
506 print
'<div class="assignedtouser">';
507 print $form->select_dolusers_forevent(
'view',
'assignedtouser', 1, array(), 0,
'', array(),
'0', 0, 0,
'', ($act->datep != $act->datef) ? 1 : 0, $listofuserid, $listofcontactid, $listofotherid);
526 if (($element_id || $element_ref) && $element ==
'societe') {
527 $socstatic = fetchObjectByElement($element_id, $element, $element_ref);
528 if (is_object($socstatic)) {
529 '@phan-var-force Societe $socstatic';
534 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
537 print
dol_get_fiche_head($head,
'resources', $langs->trans(
"ThirdParty"), -1,
'company');
539 dol_banner_tab($socstatic,
'socid',
'', ($user->socid ? 0 : 1),
'rowid',
'nom',
'',
'&element='.$element);
541 print
'<div class="fichecenter">';
543 print
'<div class="underbanner clearboth"></div>';
544 print
'<table class="border centpercent">';
547 print
'<tr><td class="titlefield">'.$langs->trans(
'AliasNames').
'</td><td colspan="3">';
548 print $socstatic->name_alias;
562 if (($element_id || $element_ref) && $element ==
'fichinter') {
563 require_once DOL_DOCUMENT_ROOT.
'/core/lib/fichinter.lib.php';
566 $fichinter->fetch($element_id, $element_ref);
567 $fichinter->fetch_thirdparty();
569 $usercancreate = $user->hasRight(
'fichinter',
'creer');
571 if (is_object($fichinter)) {
573 print
dol_get_fiche_head($head,
'resource', $langs->trans(
"InterventionCard"), -1,
'intervention');
576 $linkback =
'<a href="'.DOL_URL_ROOT.
'/fichinter/list.php'.(!empty($socid) ?
'?socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
579 $morehtmlref =
'<div class="refidno">';
583 $morehtmlref .= $form->editfieldkey(
"RefCustomer",
'ref_client', $fichinter->ref_client, $fichinter, 0,
'string',
'', 0, 1);
584 $morehtmlref .= $form->editfieldval(
"RefCustomer",
'ref_client', $fichinter->ref_client, $fichinter, 0,
'string',
'',
null,
null,
'', 1);
586 $morehtmlref .=
'<br>'.$fichinter->thirdparty->getNomUrl(1,
'customer');
589 $langs->load(
"projects");
590 $morehtmlref .=
'<br>';
591 if ($usercancreate && 0) {
592 $morehtmlref .=
img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
593 if ($action !=
'classify') {
594 $morehtmlref .=
'<a class="editfielda" href="'.$_SERVER[
'PHP_SELF'].
'?action=classify&token='.
newToken().
'&id='.$fichinter->id.
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
596 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.$fichinter->id, $fichinter->socid, (
string) $fichinter->fk_project, ($action ==
'classify' ?
'projectid' :
'none'), 0, 0, 0, 1,
'',
'maxwidth300');
598 if (!empty($fichinter->fk_project)) {
600 $proj->fetch($fichinter->fk_project);
601 $morehtmlref .= $proj->getNomUrl(1);
603 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
608 $morehtmlref .=
'</div>';
610 dol_banner_tab($fichinter,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref,
'&element='.$element, 0,
'',
'', 1);
617 if (($element_id || $element_ref) && ($element ==
'product' || $element ==
'service')) {
618 require_once DOL_DOCUMENT_ROOT.
'/core/lib/product.lib.php';
621 $product->fetch($element_id, $element_ref);
623 if (is_object($product)) {
625 $titre = $langs->trans(
"CardProduct".$product->type);
631 if ($user->socid && !in_array(
'product', explode(
',',
getDolGlobalString(
'MAIN_MODULES_FOR_EXTERNAL')))) {
634 dol_banner_tab($product,
'ref',
'', $shownav,
'ref',
'ref',
'',
'&element='.$element);
642 $parameters = array(
'element' => $element,
'element_id' => $element_id,
'element_ref' => $element_ref);
643 $reshook = $hookmanager->executeHooks(
'printElementTab', $parameters, $object, $action);
654 foreach (
$object->available_resources as $modresources => $resources) {
655 $resources = (array) $resources;
656 foreach ($resources as $resource_obj) {
662 if (strpos($resource_obj,
'@')) {
663 $path .=
'/'.$element_prop[
'module'];
666 $linked_resources =
$object->getElementResources($element, $element_id, $resource_obj);
669 $defaulttpldir =
'/core/tpl';
670 $dirtpls = array_merge($conf->modules_parts[
'tpl'], array($defaulttpldir), array($path.$defaulttpldir));
672 foreach ($dirtpls as $module => $reldir) {
673 if (file_exists(
dol_buildpath($reldir.
'/resource_'.$element_prop[
'element'].
'_add.tpl.php'))) {
674 $tpl =
dol_buildpath($reldir.
'/resource_'.$element_prop[
'element'].
'_add.tpl.php');
676 $tpl = DOL_DOCUMENT_ROOT.$reldir.
'/resource_add.tpl.php';
678 if (empty($conf->file->strict_mode)) {
679 $res = @include $tpl;
688 if ($mode !=
'add' || $resource_obj != $resource_type) {
689 foreach ($dirtpls as $module => $reldir) {
690 if (file_exists(
dol_buildpath($reldir.
'/resource_'.$element_prop[
'element'].
'_view.tpl.php'))) {
691 $tpl =
dol_buildpath($reldir.
'/resource_'.$element_prop[
'element'].
'_view.tpl.php');
693 $tpl = DOL_DOCUMENT_ROOT.$reldir.
'/resource_view.tpl.php';
695 if (empty($conf->file->strict_mode)) {
696 $res = @include $tpl;
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
actions_prepare_head($object)
Prepare array with list of tabs.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage agenda events (actions)
Class to manage products or services.
const TYPE_SERVICE
Service.
Class to manage projects.
societe_prepare_head(Societe $object)
Return array of tabs to used on pages for third parties cards.
fichinter_prepare_head($object)
Prepare array with list of tabs.
dol_now($mode='gmt')
Return date for now.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getElementProperties($elementType)
Get an array with properties of an element.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.
product_prepare_head($object)
Prepare array with list of tabs.
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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.