32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formcompany.class.php';
34require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formfile.class.php';
35require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formprojet.class.php';
36require_once DOL_DOCUMENT_ROOT .
'/hrm/class/skill.class.php';
37require_once DOL_DOCUMENT_ROOT .
'/hrm/lib/hrm_skill.lib.php';
41$langs->loadLangs(array(
'hrm',
'other',
'products'));
46$action =
GETPOST(
'action',
'aZ09');
47$confirm =
GETPOST(
'confirm',
'alpha');
48$cancel =
GETPOST(
'cancel',
'aZ09');
49$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'skillcard';
50$backtopage =
GETPOST(
'backtopage',
'alpha');
51$backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
58$hookmanager->initHooks(array(
'skillcard',
'globalcard'));
61$extrafields->fetch_name_optionals_label(
$object->table_element);
63$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
67$search_all =
GETPOST(
"search_all",
'alpha');
69foreach (
$object->fields as $key => $val) {
70 if (
GETPOST(
'search_' . $key,
'alpha')) {
71 $search[$key] =
GETPOST(
'search_' . $key,
'alpha');
75if (empty($action) && empty($id) && empty($ref)) {
80include DOL_DOCUMENT_ROOT .
'/core/actions_fetchobject.inc.php';
83$permissiontoread = $user->hasRight(
'hrm',
'all',
'read');
84$permissiontoadd = $user->hasRight(
'hrm',
'all',
'write');
85$permissiontodelete = $user->hasRight(
'hrm',
'all',
'delete');
87$upload_dir = $conf->hrm->multidir_output[isset(
$object->entity) ?
$object->entity : 1] .
'/skill';
94if (empty($conf->hrm->enabled)) {
97if (!$permissiontoread || ($action ===
'create' && !$permissiontoadd)) {
101$MaxNumberSkill =
getDolGlobalInt(
'HRM_MAXRANK', Skill::DEFAULT_MAX_RANK_PER_SKILL);
108$parameters = array();
109$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
114if (empty($reshook)) {
117 $backurlforlist = DOL_URL_ROOT.
'/hrm/skill_list.php';
119 if (empty($backtopage) || ($cancel && empty($id))) {
120 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
121 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
122 $backtopage = $backurlforlist;
124 $backtopage = DOL_URL_ROOT.
'/hrm/skill_card.php?id=' . (
$id > 0 ?
$id :
'__ID__');
129 $triggermodname =
'HRM_SKILL_MODIFY';
132 $skilldetArray =
GETPOST(
"descriptionline",
"array:alphanohtml");
134 if (is_array($skilldetArray) && count($skilldetArray) > 0) {
135 if ($action ==
'update' && $permissiontoadd) {
136 foreach ($skilldetArray as $key => $SkValueToUpdate) {
138 $res = $skilldetObj->fetch($key);
140 $skilldetObj->description = $SkValueToUpdate;
141 $resupd = $skilldetObj->update($user);
154 if (in_array($action, array(
"confirm_delete",
"update"))) {
158 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
161 if (is_array($skilldetArray) && count($skilldetArray) > 0) {
162 if ($action ==
'add' && $permissiontoadd) {
163 $arraySkill =
$object->fetchLines();
164 '@phan-var-force Skilldet[] $arraySkill';
166 foreach ($arraySkill as $skilldet) {
167 if ($skilldet->rankorder != 0) {
168 if (isset($skilldetArray[$index])) {
169 $SkValueToUpdate = $skilldetArray[$index];
170 $skilldet->description = !empty($SkValueToUpdate) ? $SkValueToUpdate : $skilldet->description;
171 $resupd = $skilldet->update($user);
179 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?id=".
$object->id);
189 include DOL_DOCUMENT_ROOT .
'/core/actions_dellink.inc.php';
192 include DOL_DOCUMENT_ROOT .
'/core/actions_printing.inc.php';
198 include DOL_DOCUMENT_ROOT .
'/core/actions_builddoc.inc.php';
200 if ($action ==
'set_thirdparty' && $permissiontoadd) {
201 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
203 if ($action ==
'classin' && $permissiontoadd) {
208 $triggersendname =
'HRM_SKILL_SENTBYMAIL';
209 $autocopy =
'MAIN_MAIL_AUTOCOPY_SKILL_TO';
210 $trackid =
'skill' .
$object->id;
211 include DOL_DOCUMENT_ROOT .
'/core/actions_sendmails.inc.php';
213 if ($action ==
'confirm_clone' && $confirm !=
'yes') {
217 if ($action ==
'confirm_clone' && $confirm ==
'yes' && $permissiontoadd) {
219 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?id=".$id);
229$form =
new Form($db);
233$title = $langs->trans(
"Skill");
239if ($action ==
'create') {
242 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
243 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
244 print
'<input type="hidden" name="action" value="add">';
245 $backtopage .= (strpos($backtopage,
'?') > 0 ?
'&' :
'?') .
"objecttype=job";
247 print
'<input type="hidden" name="backtopage" value="' . $backtopage .
'">';
249 if ($backtopageforcancel) {
250 print
'<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel .
'">';
255 print
'<table class="border centpercent tableforfieldcreate">' .
"\n";
258 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_add.tpl.php';
261 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
268 print
'</table>' .
"\n";
271 print
'<table class="border centpercent =">' .
"\n";
272 for ($i = 1; $i <= $MaxNumberSkill; $i++) {
273 print
'<tr><td class="titlefieldcreate tdtop">'. $langs->trans(
'Description') .
' ' . $langs->trans(
'rank') .
' ' . $i .
'</td>';
274 print
'<td class="valuefieldcreate"><textarea name="descriptionline[]" rows="5" class="flat minwidth100" style="margin-top: 5px; width: 90%"></textarea></td>';
280 print
'<div class="center">';
281 print
'<input type="submit" class="button" name="add" value="' .
dol_escape_htmltag($langs->trans(
"Create")) .
'">';
283 print
'<input type="' . ($backtopage ?
"submit" :
"button") .
'" class="button button-cancel" name="cancel" value="' .
dol_escape_htmltag($langs->trans(
"Cancel")) .
'"' . ($backtopage ?
'' :
' onclick="history.go(-1)"') .
'>';
293if (($id || $ref) && $action ==
'edit') {
296 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
297 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
298 print
'<input type="hidden" name="action" value="update">';
299 print
'<input type="hidden" name="id" value="' .
$object->id .
'">';
301 print
'<input type="hidden" name="backtopage" value="' . $backtopage .
'">';
303 if ($backtopageforcancel) {
304 print
'<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel .
'">';
309 print
'<table class="border centpercent tableforfieldedit">' .
"\n";
312 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_edit.tpl.php';
315 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
322 $SkilldetRecords =
$object->fetchLines();
323 '@phan-var-force Skilldet[] $SkilldetRecords';
325 if (is_array($SkilldetRecords) && count($SkilldetRecords) == 0) {
329 if (is_array($SkilldetRecords) && count($SkilldetRecords) > 0) {
331 foreach ($SkilldetRecords as $sk) {
332 if ($sk->rankorder > $MaxNumberSkill) {
336 print
'<table class="border centpercent =">' .
"\n";
338 foreach ($sk->fields as $key => $val) {
339 if (abs($val[
'visible']) != 1 && abs($val[
'visible']) != 3 && abs($val[
'visible']) != 4) {
343 if (array_key_exists(
'enabled', $val) && isset($val[
'enabled']) && !
verifCond($val[
'enabled'])) {
347 print
'<tr class="field_' . $key .
'"><td';
348 print
' class="titlefieldcreate';
349 if (isset($val[
'notnull']) && $val[
'notnull'] > 0) {
350 print
' fieldrequired';
352 if (preg_match(
'/^(text|html)/', $val[
'type'])) {
359 print $langs->trans($val[
'label']).
' '.$langs->trans(
'rank').
' '.$sk->rankorder;
362 print
'<td class="valuefieldcreate">';
372 if (!empty($tmparray[1])) {
373 $check = $tmparray[1];
375 $check =
'restricthtml';
378 $skilldetArray =
GETPOST(
"descriptionline",
"array");
379 if (empty($skilldetArray)) {
380 $value = GETPOSTISSET($key) ?
GETPOST($key, $check) : $sk->$key;
382 $value = $skilldetArray[$sk->id];
391 if (!empty($val[
'noteditable'])) {
392 print $sk->showOutputField($val, $key, $value,
'',
'',
'', 0);
395 print $sk->showInputField($val, $key, $value,
"",
"line[" . $sk->id .
"]",
"",
"");
407 print
'<div class="center"><input type="submit" class="button button-save" name="save" value="' . $langs->trans(
"Save") .
'">';
408 print
' <input type="submit" class="button button-cancel" name="cancel" value="' . $langs->trans(
"Cancel") .
'">';
416if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
417 $res =
$object->fetch_optionals();
425 if ($action ==
'delete') {
426 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id, $langs->trans(
'DeleteSkill'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
429 if ($action ==
'deleteline') {
430 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&lineid=' . $lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
433 if ($action ===
'clone') {
434 $formquestion = array(
435 array(
'type' =>
'text',
'name' =>
'clone_label',
'label' => $langs->trans(
"Label"),
'value' => $langs->trans(
"CopyOf").
' '.
$object->label),
437 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->label),
'confirm_clone', $formquestion,
'yes', 1, 280);
441 if ($action ==
'xxx') {
442 $formquestion = array();
453 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id, $langs->trans(
'XXX'), $text,
'confirm_xxx', $formquestion, 0, 1, 220);
457 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
458 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
459 if (empty($reshook)) {
460 $formconfirm .= $hookmanager->resPrint;
461 } elseif ($reshook > 0) {
462 $formconfirm = $hookmanager->resPrint;
471 $linkback =
'<a href="' . DOL_URL_ROOT.
'/hrm/skill_list.php?restore_lastsearch_values=1' . (!empty($socid) ?
'&socid=' . $socid :
'') .
'">' . $langs->trans(
"BackToList") .
'</a>';
474 $morehtmlref =
'<div class="refid">';
475 $morehtmlref .=
$object->label;
476 $morehtmlref .=
'</div>';
477 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'rowid', $morehtmlref);
480 print
'<div class="fichecenter">';
481 print
'<div class="fichehalfleft">';
482 print
'<div class="underbanner clearboth"></div>';
483 print
'<table class="border centpercent tableforfield">' .
"\n";
485 $object->fields[
'label'][
'visible'] = 0;
486 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_view.tpl.php';
489 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
496 print
'<div class="clearboth"></div>';
505 if ($action !=
'presend' && $action !=
'editline') {
506 print
'<div class="tabsAction">' .
"\n";
507 $parameters = array();
508 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
513 if (empty($reshook)) {
515 if (
$object->status == $object::STATUS_VALIDATED) {
516 print
dolGetButtonAction($langs->trans(
'SetToDraft'),
'',
'default', $_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&action=confirm_setdraft&confirm=yes&token=' .
newToken(),
'', $permissiontoadd);
519 print
dolGetButtonAction($langs->trans(
'Modify'),
'',
'default', $_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&action=edit&token=' .
newToken(),
'', $permissiontoadd);
522 if ($permissiontoadd) {
526 print
dolGetButtonAction($langs->trans(
'Delete'),
'',
'delete', $_SERVER[
'PHP_SELF'] .
'?id=' .
$object->id .
'&action=delete&token=' .
newToken(),
'', $permissiontodelete);
528 print
'</div>' .
"\n";
535if ($action !=
"create" && $action !=
"edit") {
536 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formcompany.class.php';
537 require_once DOL_DOCUMENT_ROOT .
'/core/lib/date.lib.php';
538 require_once DOL_DOCUMENT_ROOT .
'/core/lib/company.lib.php';
541 require_once __DIR__ .
'/class/skilldet.class.php';
546 $action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
547 $massaction =
GETPOST(
'massaction',
'alpha');
549 $confirm =
GETPOST(
'confirm',
'alpha');
550 $cancel =
GETPOST(
'cancel',
'alpha');
551 $toselect =
GETPOST(
'toselect',
'array');
552 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'skilldetlist';
553 $backtopage =
GETPOST(
'backtopage',
'alpha');
554 $optioncss =
GETPOST(
'optioncss',
'aZ');
560 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
561 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
563 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
567 $offset = $limit * $page;
568 $pageprev = $page - 1;
569 $pagenext = $page + 1;
578 reset($objectline->fields);
579 $sortfield =
"t." . key($objectline->fields);
586 $search_all =
GETPOST(
'search_all',
'alphanohtml') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml');
588 foreach ($objectline->fields as $key => $val) {
589 if (
GETPOST(
'search_' . $key,
'alpha') !==
'') {
590 $search[$key] =
GETPOST(
'search_' . $key,
'alpha');
592 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
599 $fieldstosearchall = array();
600 foreach ($objectline->fields as $key => $val) {
601 if (!empty($val[
'searchall'])) {
602 $fieldstosearchall[
't.' . $key] = $val[
'label'];
607 $arrayfields = array();
608 foreach ($objectline->fields as $key => $val) {
610 if (!empty($val[
'visible'])) {
611 $visible = (int)
dol_eval((
string) $val[
'visible'], 1, 1,
'1');
612 $arrayfields[
't.' . $key] = array(
613 'label' => $val[
'label'],
614 'checked' => (($visible < 0) ? 0 : 1),
615 'enabled' => (abs($visible) != 3 && (bool)
dol_eval($val[
'enabled'], 1)),
616 'position' => $val[
'position'],
617 'help' => isset($val[
'help']) ? $val[
'help'] :
''
622 $objectline->fields =
dol_sort_array($objectline->fields,
'position');
628 $form =
new Form($db);
633 $title = $langs->transnoentitiesnoconv(
"Skilldets");
636 $nbtotalofrecords =
'';
641 $sql .= $objectline->getFieldList(
't');
642 $sql .=
" FROM " . MAIN_DB_PREFIX . $objectline->table_element .
" as t";
643 if ($objectline->ismultientitymanaged == 1) {
644 $sql .=
" WHERE t.entity IN (" .
getEntity($objectline->element) .
")";
646 $sql .=
" WHERE 1 = 1 ";
648 $sql .=
" AND fk_skill = ".((int) $id);
649 $sql .=
" AND rankorder <> 0";
651 $resql = $db->query($sql);
652 $nbtotalofrecords = $db->num_rows($resql);
653 $num = $db->num_rows($resql);
655 print
'<form method="POST" id="searchFormList" action="' . $_SERVER[
"PHP_SELF"] .
'">' .
"\n";
656 if ($optioncss !=
'') {
657 print
'<input type="hidden" name="optioncss" value="' . $optioncss .
'">';
659 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
660 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
661 print
'<input type="hidden" name="action" value="list">';
662 print
'<input type="hidden" name="sortfield" value="' . $sortfield .
'">';
663 print
'<input type="hidden" name="sortorder" value="' . $sortorder .
'">';
664 print
'<input type="hidden" name="page" value="' . $page .
'">';
665 print
'<input type="hidden" name="contextpage" value="' . $contextpage .
'">';
667 print
'<input type="hidden" name="id" value="' .
$id .
'">';
670 $param_fk =
"&fk_skill=" .
$id .
"&fk_user_creat=" . (!empty($user->rowid) ? $user->rowid : 0);
673 $massactionbutton =
"";
676 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_' .
$object->picto, 0,
'',
'', 0, 0, 0, 1);
679 $topicmail =
"SendSkilldetRef";
680 $modelmail =
"skilldet";
682 $trackid =
'xxxx' .
$object->id;
686 foreach ($fieldstosearchall as $key => $val) {
687 $fieldstosearchall[$key] = $langs->trans($val);
689 print
'<div class="divsearchfieldfilter">' . $langs->trans(
"FilterOnInto", $search_all) . implode(
', ', $fieldstosearchall) .
'</div>';
697 $parameters = array();
698 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $objectline);
699 if (empty($reshook)) {
700 $moreforfilter .= $hookmanager->resPrint;
702 $moreforfilter = $hookmanager->resPrint;
705 if (!empty($moreforfilter)) {
706 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
707 print $moreforfilter;
711 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
715 print
'<div class="div-table-responsive">';
716 print
'<table class="tagtable nobottomiftotal liste' . ($moreforfilter ?
" listwithfilterbefore" :
"") .
'">' .
"\n";
721 print
'<tr class="liste_titre">';
722 foreach ($objectline->fields as $key => $val) {
733 if (!empty($arrayfields[
't.' . $key][
'checked'])) {
734 print
getTitleFieldOfList($arrayfields[
't.' . $key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.' . $key,
'', $param, (!empty($cssforfield) ?
'class="' . $cssforfield .
'"' :
''), $sortfield, $sortorder, (!empty($cssforfield) ? $cssforfield .
' ' :
'')) .
"\n";
739 print
'</tr>' .
"\n";
746 $totalarray = array();
747 $totalarray[
'nbfield'] = 0;
748 while ($i < ($limit ? min($num, $limit) : $num)) {
749 $obj = $db->fetch_object($resql);
754 if ($obj->rankorder > $MaxNumberSkill) {
759 $objectline->setVarsFromFetchObj($obj);
762 print
'<tr class="oddeven">';
763 foreach ($objectline->fields as $key => $val) {
782 if (!empty($arrayfields[
't.' . $key][
'checked'])) {
783 print
'<td' . (empty($cssforfield) ?
'' :
' class="' . $cssforfield .
'"') .
'>';
784 if ($key ==
'status') {
785 print $objectline->getLibStatut(5);
786 } elseif ($key ==
'rowid') {
787 print $objectline->showOutputField($val, $key, $objectline->id,
'');
789 print
'<a class="timeline-btn" href="' . DOL_MAIN_URL_ROOT .
'/comm/action/skilldet_card.php?action=edit&id=' . $objectline->id .
'"><i class="fa fa-pencil" title="' . $langs->trans(
"Modify") .
'" ></i></a>';
791 print $objectline->showOutputField($val, $key, $objectline->$key,
'');
797 $totalarray[
'nbfield']++;
799 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
801 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.' . $key;
803 if (!isset($totalarray[
'val'])) {
804 $totalarray[
'val'] = array();
806 if (!isset($totalarray[
'val'][
't.' . $key])) {
807 $totalarray[
'val'][
't.' . $key] = 0;
809 $totalarray[
'val'][
't.' . $key] += $objectline->$key;
831 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $objectline,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
832 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $objectline);
833 print $hookmanager->resPrint;
839 $totalarray[
'nbfield']++;
842 print
'</tr>' .
"\n";
852 foreach ($arrayfields as $key => $val) {
853 if (!empty($val[
'checked'])) {
857 print
'<tr><td colspan="' . $colspan .
'"><span class="opacitymedium">' . $langs->trans(
"NoRecordFound") .
'</span></td></tr>';
860 if (!empty($resql)) {
864 $parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
865 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $objectline);
866 print $hookmanager->resPrint;
868 print
'</table>' .
"\n";
869 print
'</div>' .
"\n";
871 print
'</form>' .
"\n";
893 print
'<div class="fichecenter"><div class="fichehalfleft">';
896 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'skill'), 1);
897 $linktoelem = $tmparray[
'linktoelem'];
898 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
899 print $htmltoenteralink;
901 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
903 print
'</div><div class="fichehalfright">';
907 $morehtmlcenter =
dolGetButtonTitle($langs->trans(
'SeeAll'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/hrm/skill_agenda.php?id='.
$object->id);
910 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formactions.class.php';
912 $somethingshown = $formactions->showactions($object,
$object->element .
'@' .
$object->module, (is_object(
$object->thirdparty) ?
$object->thirdparty->id : 0), 1,
'', $MAXEVENT,
'', $morehtmlcenter);
914 print
'</div></div>';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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.
verifCond($strToEvaluate, $onlysimplestring='1')
Verify if condition in string is ok or not.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
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)
Show tabs of a record.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
setEventMessage($mesgs, $style='mesgs', $noduplicate=0, $attop=0)
Set event message in dol_events session object.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
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.
getEntity($element, $shared=1, $currentobject=null)
Get list of entity id to use.
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...
skillPrepareHead($object)
Prepare array of tabs for Skill.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.