29require
'../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/resource/class/dolresource.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/fichinter/class/fichinter.class.php';
33if (isModEnabled(
'project')) {
34 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
37if (isModEnabled(
"product") || isModEnabled(
"service")) {
38 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
42$langs->loadLangs(array(
'resource',
'other',
'interventions'));
52$hookmanager->initHooks(array(
'element_resource'));
53$object->available_resources = array(
'dolresource');
57$element_id =
GETPOST(
'element_id',
'int');
58$element_ref =
GETPOST(
'ref',
'alpha');
59$element =
GETPOST(
'element',
'alpha');
60$action =
GETPOST(
'action',
'alpha');
61$mode =
GETPOST(
'mode',
'alpha');
62$lineid =
GETPOST(
'lineid',
'int');
63$resource_id =
GETPOST(
'fk_resource',
'int');
64$resource_type =
GETPOST(
'resource_type',
'alpha');
66$mandatory =
GETPOST(
'mandatory',
'int');
67$cancel =
GETPOST(
'cancel',
'alpha');
68$confirm =
GETPOST(
'confirm',
'alpha');
69$socid =
GETPOST(
'socid',
'int');
71if (empty($mandatory)) {
83if (!$user->rights->resource->read) {
88if ($element ==
'action') {
89 $result =
restrictedArea($user,
'agenda', $element_id,
'actioncomm&societe',
'myactions|allactions',
'fk_soc',
'id');
91if ($element ==
'fichinter') {
92 $result =
restrictedArea($user,
'ficheinter', $element_id,
'fichinter');
94if ($element ==
'product' || $element ==
'service') {
96 $tmpobject->fetch($element_id);
97 $fieldtype = $tmpobject->type;
98 $result =
restrictedArea($user,
'produit|service', $element_id,
'product&product',
'',
'', $fieldtype);
106$parameters = array(
'resource_id' => $resource_id);
107$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
112if (empty($reshook)) {
115 if ($action ==
'add_element_resource' && !$cancel) {
117 if (!($resource_id > 0)) {
119 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Resource")),
null,
'errors');
123 $objstat->element = $element;
127 if (!empty($conf->global->RESOURCE_USED_IN_EVENT_CHECK) && $objstat->element ==
'action' && $resource_type ==
'dolresource' && intval($busy) == 1) {
128 $eventDateStart = $objstat->datep;
129 $eventDateEnd = $objstat->datef;
130 $isFullDayEvent = $objstat->fulldayevent;
131 if (empty($eventDateEnd)) {
132 if ($isFullDayEvent) {
134 $eventDateStart =
dol_mktime(0, 0, 0, $eventDateStartArr[
'mon'], $eventDateStartArr[
'mday'], $eventDateStartArr[
'year']);
135 $eventDateEnd =
dol_mktime(23, 59, 59, $eventDateStartArr[
'mon'], $eventDateStartArr[
'mday'], $eventDateStartArr[
'year']);
139 $sql =
"SELECT er.rowid, r.ref as r_ref, ac.id as ac_id, ac.label as ac_label";
140 $sql .=
" FROM ".MAIN_DB_PREFIX.
"element_resources as er";
141 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"resource as r ON r.rowid = er.resource_id AND er.resource_type = '".$db->escape($resource_type).
"'";
142 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"actioncomm as ac ON ac.id = er.element_id AND er.element_type = '".$db->escape($objstat->element).
"'";
143 $sql .=
" WHERE er.resource_id = ".((int) $resource_id);
144 $sql .=
" AND er.busy = 1";
148 $sql .=
" (ac.datep <= '".$db->idate($eventDateStart).
"' AND (ac.datep2 IS NULL OR ac.datep2 >= '".$db->idate($eventDateStart).
"'))";
150 if (!empty($eventDateEnd)) {
151 $sql .=
" OR (ac.datep <= '".$db->idate($eventDateEnd).
"' AND (ac.datep2 >= '".$db->idate($eventDateEnd).
"'))";
155 $sql .=
"ac.datep >= '".$db->idate($eventDateStart).
"'";
156 if (!empty($eventDateEnd)) {
157 $sql .=
" AND (ac.datep2 IS NOT NULL AND ac.datep2 <= '".$db->idate($eventDateEnd).
"')";
162 $resql = $db->query($sql);
165 $objstat->error = $db->lasterror();
166 $objstat->errors[] = $objstat->error;
168 if ($db->num_rows($resql) > 0) {
171 $objstat->error = $langs->trans(
'ErrorResourcesAlreadyInUse').
' : ';
172 while ($obj = $db->fetch_object($resql)) {
173 $objstat->error .=
'<br> - '.$langs->trans(
'ErrorResourceUseInEvent', $obj->r_ref, $obj->ac_label.
' ['.$obj->ac_id.
']');
175 $objstat->errors[] = $objstat->error;
182 $res = $objstat->add_element_resource($resource_id, $resource_type, $busy, $mandatory);
186 if (!$error && $res > 0) {
187 setEventMessages($langs->trans(
'ResourceLinkedWithSuccess'),
null,
'mesgs');
188 header(
"Location: ".$_SERVER[
'PHP_SELF'].
'?element='.$element.
'&element_id='.$objstat->id);
190 } elseif ($objstat) {
196 if ($action ==
'update_linked_resource' && $user->rights->resource->write && !
GETPOST(
'cancel',
'alpha')) {
197 $res = $object->fetch_element_resource($lineid);
199 $object->busy = $busy;
200 $object->mandatory = $mandatory;
202 if (!empty($conf->global->RESOURCE_USED_IN_EVENT_CHECK) && $object->element_type ==
'action' && $object->resource_type ==
'dolresource' && intval($object->busy) == 1) {
203 $eventDateStart = $object->objelement->datep;
204 $eventDateEnd = $object->objelement->datef;
205 $isFullDayEvent = $objstat->fulldayevent;
206 if (empty($eventDateEnd)) {
207 if ($isFullDayEvent) {
209 $eventDateStart =
dol_mktime(0, 0, 0, $eventDateStartArr[
'mon'], $eventDateStartArr[
'mday'], $eventDateStartArr[
'year']);
210 $eventDateEnd =
dol_mktime(23, 59, 59, $eventDateStartArr[
'mon'], $eventDateStartArr[
'mday'], $eventDateStartArr[
'year']);
214 $sql =
"SELECT er.rowid, r.ref as r_ref, ac.id as ac_id, ac.label as ac_label";
215 $sql .=
" FROM ".MAIN_DB_PREFIX.
"element_resources as er";
216 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"resource as r ON r.rowid = er.resource_id AND er.resource_type = '".$db->escape($object->resource_type).
"'";
217 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"actioncomm as ac ON ac.id = er.element_id AND er.element_type = '".$db->escape($object->element_type).
"'";
218 $sql .=
" WHERE er.resource_id = ".((int) $object->resource_id);
219 $sql .=
" AND ac.id <> ".((int) $object->element_id);
220 $sql .=
" AND er.busy = 1";
224 $sql .=
" (ac.datep <= '".$db->idate($eventDateStart).
"' AND (ac.datep2 IS NULL OR ac.datep2 >= '".$db->idate($eventDateStart).
"'))";
226 if (!empty($eventDateEnd)) {
227 $sql .=
" OR (ac.datep <= '".$db->idate($eventDateEnd).
"' AND (ac.datep2 IS NULL OR ac.datep2 >= '".$db->idate($eventDateEnd).
"'))";
231 $sql .=
"ac.datep >= '".$db->idate($eventDateStart).
"'";
232 if (!empty($eventDateEnd)) {
233 $sql .=
" AND (ac.datep2 IS NOT NULL AND ac.datep2 <= '".$db->idate($eventDateEnd).
"')";
238 $resql = $db->query($sql);
241 $object->error = $db->lasterror();
242 $object->errors[] = $object->error;
244 if ($db->num_rows($resql) > 0) {
247 $object->error = $langs->trans(
'ErrorResourcesAlreadyInUse').
' : ';
248 while ($obj = $db->fetch_object($resql)) {
249 $object->error .=
'<br> - '.$langs->trans(
'ErrorResourceUseInEvent', $obj->r_ref, $obj->ac_label.
' ['.$obj->ac_id.
']');
251 $object->errors[] = $objstat->error;
258 $result = $object->update_element_resource($user);
267 setEventMessages($langs->trans(
'RessourceLineSuccessfullyUpdated'),
null,
'mesgs');
268 header(
"Location: ".$_SERVER[
'PHP_SELF'].
"?element=".$element.
"&element_id=".$element_id);
275 if ($action ==
'confirm_delete_linked_resource' && $user->rights->resource->delete && $confirm ===
'yes') {
276 $result = $object->delete_resource($lineid, $element);
279 setEventMessages($langs->trans(
'RessourceLineSuccessfullyDeleted'),
null,
'mesgs');
280 header(
"Location: ".$_SERVER[
'PHP_SELF'].
"?element=".$element.
"&element_id=".$element_id);
288$parameters = array(
'resource_id'=>$resource_id);
289$reshook = $hookmanager->executeHooks(
'getElementResources', $parameters, $object, $action);
300$form =
new Form($db);
302$pagetitle = $langs->trans(
'ResourceElementPage');
306$delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60;
309$ret = count($object->available_resources);
315 print
'<div class="warning">'.$langs->trans(
'NoResourceInDatabase').
'</div>';
318 if ($action ==
'delete_resource') {
319 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);
324 if (($element_id || $element_ref) && $element ==
'action') {
325 require_once DOL_DOCUMENT_ROOT.
'/core/lib/agenda.lib.php';
328 $hookmanager->initHooks(array(
'actioncard',
'globalcard'));
331 if (is_object($act)) {
336 $linkback =
img_picto($langs->trans(
"BackToList"),
'object_list',
'class="hideonsmartphone pictoactionview"');
337 $linkback .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/list.php?mode=show_list">'.$langs->trans(
"BackToList").
'</a>';
341 $out .=
'</li><li class="noborder litext">'.img_picto($langs->trans(
"ViewPerUser"),
'object_calendarperuser',
'class="hideonsmartphone pictoactionview"');
342 $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').
'">'.$langs->trans(
"ViewPerUser").
'</a>';
343 $out .=
'</li><li class="noborder litext">'.img_picto($langs->trans(
"ViewCal"),
'object_calendar',
'class="hideonsmartphone pictoactionview"');
344 $out .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php?mode=show_month&year='.
dol_print_date($act->datep,
'%Y').
'&month='.
dol_print_date($act->datep,
'%m').
'&day='.
dol_print_date($act->datep,
'%d').
'">'.$langs->trans(
"ViewCal").
'</a>';
345 $out .=
'</li><li class="noborder litext">'.img_picto($langs->trans(
"ViewWeek"),
'object_calendarweek',
'class="hideonsmartphone pictoactionview"');
346 $out .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php?mode=show_day&year='.
dol_print_date($act->datep,
'%Y').
'&month='.
dol_print_date($act->datep,
'%m').
'&day='.
dol_print_date($act->datep,
'%d').
'">'.$langs->trans(
"ViewWeek").
'</a>';
347 $out .=
'</li><li class="noborder litext">'.img_picto($langs->trans(
"ViewDay"),
'object_calendarday',
'class="hideonsmartphone pictoactionview"');
348 $out .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php?mode=show_day&year='.
dol_print_date($act->datep,
'%Y').
'&month='.
dol_print_date($act->datep,
'%m').
'&day='.
dol_print_date($act->datep,
'%d').
'">'.$langs->trans(
"ViewDay").
'</a>';
351 $parameters = array();
352 $reshook = $hookmanager->executeHooks(
'addCalendarView', $parameters, $object, $action);
353 if (empty($reshook)) {
354 $out .= $hookmanager->resPrint;
355 } elseif ($reshook > 1) {
356 $out = $hookmanager->resPrint;
361 $morehtmlref =
'<div class="refidno">';
365 $savobject = $object;
367 if (isModEnabled(
'project')) {
368 $langs->load(
"projects");
371 $morehtmlref .=
img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
372 if ($action !=
'classify') {
373 $morehtmlref .=
'<a class="editfielda" href="'.$_SERVER[
'PHP_SELF'].
'?action=classify&token='.newToken().
'&id='.$object->id.
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
375 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.$object->id, $object->socid, $object->fk_project, ($action ==
'classify' ?
'projectid' :
'none'), 0, 0, 0, 1,
'',
'maxwidth300');
377 if (!empty($object->fk_project)) {
379 $proj->fetch($object->fk_project);
380 $morehtmlref .= $proj->getNomUrl(1);
382 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
387 $object = $savobject;
388 $morehtmlref .=
'</div>';
390 dol_banner_tab($act,
'element_id', $linkback, ($user->socid ? 0 : 1),
'id',
'ref', $morehtmlref,
'&element='.$element, 0,
'',
'');
392 print
'<div class="fichecenter">';
394 print
'<div class="underbanner clearboth"></div>';
396 print
'<table class="border tableforfield centpercent">';
399 if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
400 print
'<tr><td class="titlefield">'.$langs->trans(
"Type").
'</td><td>';
401 print $act->getTypePicto();
402 print $langs->trans(
"Action".$act->type_code);
407 print
'<tr><td class="titlefield">'.$langs->trans(
"EventOnFullDay").
'</td><td colspan="3">'.
yn($act->fulldayevent ? 1 : 0, 3).
'</td></tr>';
410 print
'<tr><td>'.$langs->trans(
"DateActionStart").
'</td><td colspan="3">';
411 if (empty($act->fulldayevent)) {
415 print
dol_print_date($act->datep,
'day', ($tzforfullday ? $tzforfullday :
'tzuser'));
417 if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) {
424 print
'<tr><td>'.$langs->trans(
"DateActionEnd").
'</td><td colspan="3">';
425 if (empty($act->fulldayevent)) {
429 print
dol_print_date($act->datef,
'day', ($tzforfullday ? $tzforfullday :
'tzuser'));
431 if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now - $delay_warning)) {
437 if (empty($conf->global->AGENDA_DISABLE_LOCATION)) {
438 print
'<tr><td>'.$langs->trans(
"Location").
'</td><td colspan="3">'.$act->location.
'</td></tr>';
442 print
'<tr><td class="nowrap">'.$langs->trans(
"ActionAffectedTo").
'</td><td colspan="3">';
443 $listofuserid = array();
444 if (empty($donotclearsession)) {
445 if ($act->userownerid > 0) {
446 $listofuserid[$act->userownerid] = array(
'id'=>$act->userownerid,
'transparency'=>$act->transparency);
448 if (!empty($act->userassigned)) {
450 $tmplist1 = $act->userassigned; $tmplist2 = array();
451 foreach ($tmplist1 as $key => $val) {
452 if ($val[
'id'] && $val[
'id'] != $act->userownerid) {
453 $listofuserid[$val[
'id']] = $val;
457 $_SESSION[
'assignedtouser'] = json_encode($listofuserid);
459 if (!empty($_SESSION[
'assignedtouser'])) {
460 $listofuserid = json_decode($_SESSION[
'assignedtouser'],
true);
463 $listofcontactid = array();
464 $listofotherid = array();
465 print
'<div class="assignedtouser">';
466 print $form->select_dolusers_forevent(
'view',
'assignedtouser', 1,
'', 0,
'',
'', 0, 0, 0,
'', ($act->datep != $act->datef) ? 1 : 0, $listofuserid, $listofcontactid, $listofotherid);
485 if (($element_id || $element_ref) && $element ==
'societe') {
487 if (is_object($socstatic)) {
488 $savobject = $object;
489 $object = $socstatic;
491 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
494 print
dol_get_fiche_head($head,
'resources', $langs->trans(
"ThirdParty"), -1,
'company');
496 dol_banner_tab($socstatic,
'socid',
'', ($user->socid ? 0 : 1),
'rowid',
'nom',
'',
'&element='.$element);
498 print
'<div class="fichecenter">';
500 print
'<div class="underbanner clearboth"></div>';
501 print
'<table class="border centpercent">';
504 print
'<tr><td class="titlefield">'.$langs->trans(
'AliasNames').
'</td><td colspan="3">';
505 print $socstatic->name_alias;
514 $object = $savobject;
519 if (($element_id || $element_ref) && $element ==
'fichinter') {
520 require_once DOL_DOCUMENT_ROOT.
'/core/lib/fichinter.lib.php';
523 $fichinter->fetch($element_id, $element_ref);
524 $fichinter->fetch_thirdparty();
526 $usercancreate = $user->hasRight(
'fichinter',
'creer');
528 if (is_object($fichinter)) {
530 print
dol_get_fiche_head($head,
'resource', $langs->trans(
"InterventionCard"), -1,
'intervention');
533 $linkback =
'<a href="'.DOL_URL_ROOT.
'/fichinter/list.php'.(!empty($socid) ?
'?socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
536 $morehtmlref =
'<div class="refidno">';
540 $morehtmlref.=$form->editfieldkey(
"RefCustomer",
'ref_client', $fichinter->ref_client, $fichinter, 0,
'string',
'', 0, 1);
541 $morehtmlref.=$form->editfieldval(
"RefCustomer",
'ref_client', $fichinter->ref_client, $fichinter, 0,
'string',
'',
null,
null,
'', 1);
543 $morehtmlref .=
'<br>'.$fichinter->thirdparty->getNomUrl(1,
'customer');
545 if (isModEnabled(
'project')) {
546 $langs->load(
"projects");
547 $morehtmlref .=
'<br>';
548 if ($usercancreate && 0) {
549 $morehtmlref .=
img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
550 if ($action !=
'classify') {
551 $morehtmlref .=
'<a class="editfielda" href="'.$_SERVER[
'PHP_SELF'].
'?action=classify&token='.newToken().
'&id='.$fichinter->id.
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
553 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.$fichinter->id, $fichinter->socid, $fichinter->fk_project, ($action ==
'classify' ?
'projectid' :
'none'), 0, 0, 0, 1,
'',
'maxwidth300');
555 if (!empty($fichinter->fk_project)) {
557 $proj->fetch($fichinter->fk_project);
558 $morehtmlref .= $proj->getNomUrl(1);
560 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
565 $morehtmlref .=
'</div>';
567 dol_banner_tab($fichinter,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref,
'&element='.$element, 0,
'',
'', 1);
574 if (($element_id || $element_ref) && ($element ==
'product' || $element ==
'service')) {
575 require_once DOL_DOCUMENT_ROOT.
'/core/lib/product.lib.php';
578 $product->fetch($element_id, $element_ref);
580 if (is_object($product)) {
582 $titre = $langs->trans(
"CardProduct".$product->type);
588 if ($user->socid && !in_array(
'product', explode(
',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
591 dol_banner_tab($product,
'ref',
'', $shownav,
'ref',
'ref',
'',
'&element='.$element);
599 $parameters = array(
'element'=>$element,
'element_id'=>$element_id,
'element_ref'=>$element_ref);
600 $reshook = $hookmanager->executeHooks(
'printElementTab', $parameters, $object, $action);
611 foreach ($object->available_resources as $modresources => $resources) {
612 $resources = (array) $resources;
613 foreach ($resources as $resource_obj) {
619 if (strpos($resource_obj,
'@')) {
620 $path .=
'/'.$element_prop[
'module'];
623 $linked_resources = $object->getElementResources($element, $element_id, $resource_obj);
626 $defaulttpldir =
'/core/tpl';
627 $dirtpls = array_merge($conf->modules_parts[
'tpl'], array($defaulttpldir), array($path.$defaulttpldir));
629 foreach ($dirtpls as $module => $reldir) {
630 if (file_exists(
dol_buildpath($reldir.
'/resource_'.$element_prop[
'element'].
'_add.tpl.php'))) {
631 $tpl =
dol_buildpath($reldir.
'/resource_'.$element_prop[
'element'].
'_add.tpl.php');
633 $tpl = DOL_DOCUMENT_ROOT.$reldir.
'/resource_add.tpl.php';
635 if (empty($conf->file->strict_mode)) {
636 $res = @include $tpl;
645 if ($mode !=
'add' || $resource_obj != $resource_type) {
646 foreach ($dirtpls as $module => $reldir) {
647 if (file_exists(
dol_buildpath($reldir.
'/resource_'.$element_prop[
'element'].
'_view.tpl.php'))) {
648 $tpl =
dol_buildpath($reldir.
'/resource_'.$element_prop[
'element'].
'_view.tpl.php');
650 $tpl = DOL_DOCUMENT_ROOT.$reldir.
'/resource_view.tpl.php';
652 if (empty($conf->file->strict_mode)) {
653 $res = @include $tpl;
actions_prepare_head($object)
Prepare array with list of tabs.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage interventions.
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_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_now($mode='auto')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
getElementProperties($element_type)
Get an array with properties of an element.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
fetchObjectByElement($element_id, $element_type, $element_ref='')
Fetch an object from its id and element_type Inclusion of classes is automatic.
img_edit($titlealt='default', $float=0, $other='')
Show logo editer/modifier 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.