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';
49$langs->loadLangs(array(
'hrm',
'other',
'products'));
54$action =
GETPOST(
'action',
'aZ09');
55$confirm =
GETPOST(
'confirm',
'alpha');
57$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'skillcard';
58$backtopage =
GETPOST(
'backtopage',
'alpha');
59$backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
66$hookmanager->initHooks(array(
'skillcard',
'globalcard'));
69$extrafields->fetch_name_optionals_label(
$object->table_element);
71$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
75$search_all =
GETPOST(
"search_all",
'alpha');
77foreach (
$object->fields as $key => $val) {
78 if (
GETPOST(
'search_' . $key,
'alpha')) {
79 $search[$key] =
GETPOST(
'search_' . $key,
'alpha');
83if (empty($action) && empty($id) && empty($ref)) {
88include DOL_DOCUMENT_ROOT .
'/core/actions_fetchobject.inc.php';
91$permissiontoread = $user->hasRight(
'hrm',
'all',
'read');
92$permissiontoadd = $user->hasRight(
'hrm',
'all',
'write');
93$permissiontodelete = $user->hasRight(
'hrm',
'all',
'delete');
95$upload_dir =
$conf->hrm->multidir_output[isset(
$object->entity) ?
$object->entity : 1] .
'/skill';
102if (empty(
$conf->hrm->enabled)) {
105if (!$permissiontoread || ($action ===
'create' && !$permissiontoadd)) {
109$MaxNumberSkill =
getDolGlobalInt(
'HRM_MAXRANK', Skill::DEFAULT_MAX_RANK_PER_SKILL);
116$parameters = array();
119$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
121 setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
124if (empty($reshook)) {
127 $backurlforlist = DOL_URL_ROOT.
'/hrm/skill_list.php';
129 if (empty($backtopage) || ($cancel && empty($id))) {
130 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
131 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
132 $backtopage = $backurlforlist;
134 $backtopage = DOL_URL_ROOT.
'/hrm/skill_card.php?id=' . (
$id > 0 ?
$id :
'__ID__');
139 $triggermodname =
'HRM_SKILL_MODIFY';
142 $skilldetArray =
GETPOST(
"descriptionline",
"array:alphanohtml");
145 if (is_array($skilldetArray) && count($skilldetArray) > 0) {
146 if ($action ==
'update' && $permissiontoadd) {
147 foreach ($skilldetArray as $key => $SkValueToUpdate) {
149 $res = $skilldetObj->fetch($key);
151 $skilldetObj->description = $SkValueToUpdate;
152 $resupd = $skilldetObj->update($user);
154 setEventMessage($langs->trans(
'errorUpdateSkilldet'),
'errors');
165 if (in_array($action, array(
"confirm_delete",
"update"))) {
169 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
172 if (is_array($skilldetArray) && count($skilldetArray) > 0) {
173 if ($action ==
'add' && $permissiontoadd) {
174 $arraySkill =
$object->fetchLines();
175 '@phan-var-force Skilldet[] $arraySkill';
178 foreach ($arraySkill as $skilldet) {
179 if ($skilldet->rankorder != 0) {
180 if (isset($skilldetArray[$index])) {
181 $SkValueToUpdate = $skilldetArray[$index];
182 $skilldet->description = !empty($SkValueToUpdate) ? $SkValueToUpdate : $skilldet->description;
183 $resupd = $skilldet->update($user);
185 setEventMessage($langs->trans(
'errorUpdateSkilldet'),
'errors');
191 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?id=".
$object->id);
199 include DOL_DOCUMENT_ROOT .
'/core/actions_dellink.inc.php';
202 include DOL_DOCUMENT_ROOT .
'/core/actions_printing.inc.php';
208 include DOL_DOCUMENT_ROOT .
'/core/actions_builddoc.inc.php';
211 '@phan-var-force int|Skill $result';
213 if ($action ==
'set_thirdparty' && $permissiontoadd) {
214 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
216 if ($action ==
'classin' && $permissiontoadd) {
221 $triggersendname =
'HRM_SKILL_SENTBYMAIL';
222 $autocopy =
'MAIN_MAIL_AUTOCOPY_SKILL_TO';
223 $trackid =
'skill' .
$object->id;
224 include DOL_DOCUMENT_ROOT .
'/core/actions_sendmails.inc.php';
226 if ($action ==
'confirm_clone' && $confirm !=
'yes') {
230 if ($action ==
'confirm_clone' && $confirm ==
'yes' && $permissiontoadd && is_object($result)) {
231 '@phan-var-force Skill $result';
233 $clonelabel =
GETPOST(
'clone_label',
'alphanohtml');
234 if ($clonelabel !==
'' && $clonelabel !== $result->label) {
235 if ($result->setValueFrom(
'label', $clonelabel,
'',
null,
'text',
'', $user) < 0) {
236 setEventMessages($result->error, $result->errors,
'errors');
239 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?id=".$result->id);
249$form =
new Form($db);
253$title = $langs->trans(
"Skill");
259if ($action ==
'create') {
262 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
263 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
264 print
'<input type="hidden" name="action" value="add">';
265 $backtopage .= (strpos($backtopage,
'?') > 0 ?
'&' :
'?') .
"objecttype=job";
267 print
'<input type="hidden" name="backtopage" value="' . $backtopage .
'">';
269 if ($backtopageforcancel) {
270 print
'<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel .
'">';
275 print
'<table class="border centpercent tableforfieldcreate">' .
"\n";
278 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_add.tpl.php';
281 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
288 print
'</table>' .
"\n";
291 print
'<table class="border centpercent =">' .
"\n";
292 for ($i = 1; $i <= $MaxNumberSkill; $i++) {
293 print
'<tr><td class="titlefieldcreate tdtop">'. $langs->trans(
'Description') .
' ' . $langs->trans(
'rank') .
' ' . $i .
'</td>';
294 print
'<td class="valuefieldcreate"><textarea name="descriptionline[]" rows="5" class="flat minwidth100" style="margin-top: 5px; width: 90%"></textarea></td>';
300 print
'<div class="center">';
301 print
'<input type="submit" class="button" name="add" value="' .
dol_escape_htmltag($langs->trans(
"Create")) .
'">';
303 print
'<input type="' . ($backtopage ?
"submit" :
"button") .
'" class="button button-cancel" name="cancel" value="' .
dol_escape_htmltag($langs->trans(
"Cancel")) .
'"' . ($backtopage ?
'' :
' onclick="history.go(-1)"') .
'>';
313if (($id || $ref) && $action ==
'edit') {
316 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
317 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
318 print
'<input type="hidden" name="action" value="update">';
319 print
'<input type="hidden" name="id" value="' .
$object->id .
'">';
321 print
'<input type="hidden" name="backtopage" value="' . $backtopage .
'">';
323 if ($backtopageforcancel) {
324 print
'<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel .
'">';
329 print
'<table class="border centpercent tableforfieldedit">' .
"\n";
332 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_edit.tpl.php';
335 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
342 $SkilldetRecords =
$object->fetchLines();
343 '@phan-var-force Skilldet[] $SkilldetRecords';
345 if (is_array($SkilldetRecords) && count($SkilldetRecords) == 0) {
349 if (is_array($SkilldetRecords) && count($SkilldetRecords) > 0) {
351 foreach ($SkilldetRecords as $sk) {
352 if ($sk->rankorder > $MaxNumberSkill) {
356 print
'<table class="border centpercent =">' .
"\n";
358 foreach ($sk->fields as $key => $val) {
359 if (abs($val[
'visible']) != 1 && abs($val[
'visible']) != 3 && abs($val[
'visible']) != 4) {
363 if (array_key_exists(
'enabled', $val) && isset($val[
'enabled']) && !
verifCond($val[
'enabled'])) {
367 print
'<tr class="field_' . $key .
'"><td';
368 print
' class="titlefieldcreate';
369 if (isset($val[
'notnull']) && $val[
'notnull'] > 0) {
370 print
' fieldrequired';
372 if (preg_match(
'/^(text|html)/', $val[
'type'])) {
379 print $langs->trans($val[
'label']).
' '.$langs->trans(
'rank').
' '.$sk->rankorder;
382 print
'<td class="valuefieldcreate">';
397 $check =
'restricthtml';
399 $skilldetArray =
GETPOST(
"descriptionline",
"array");
400 if (empty($skilldetArray)) {
403 $value = $skilldetArray[$sk->id];
412 if (!empty($val[
'noteditable'])) {
413 print $sk->showOutputField($val, $key, $value,
'',
'',
'', 0);
416 print $sk->showInputField($val, $key, $value,
"",
"line[" . $sk->id .
"]",
"",
"");
428 print
'<div class="center"><input type="submit" class="button button-save" name="save" value="' . $langs->trans(
"Save") .
'">';
429 print
' <input type="submit" class="button button-cancel" name="cancel" value="' . $langs->trans(
"Cancel") .
'">';
437if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
438 $res =
$object->fetch_optionals();
441 print
dol_get_fiche_head($head,
'card', $langs->trans(
"Workstation"), -1,
$object->picto, 0,
'',
'', 0,
'', 1);
446 if ($action ==
'delete') {
447 $formconfirm = $form->formconfirm(
dolBuildUrl($_SERVER[
"PHP_SELF"], [
'id' =>
$object->id]), $langs->trans(
'DeleteSkill'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
450 if ($action ==
'deleteline') {
451 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&lineid=' . $lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
454 if ($action ===
'clone') {
455 $formquestion = array(
456 array(
'type' =>
'text',
'name' =>
'clone_label',
'label' => $langs->trans(
"Label"),
'value' => $langs->trans(
"CopyOf").
' '.
$object->label),
458 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->label),
'confirm_clone', $formquestion,
'yes', 1, 280);
462 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
463 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
464 if (empty($reshook)) {
465 $formconfirm .= $hookmanager->resPrint;
466 } elseif ($reshook > 0) {
467 $formconfirm = $hookmanager->resPrint;
476 $linkback =
'<a href="' . DOL_URL_ROOT.
'/hrm/skill_list.php?restore_lastsearch_values=1' . (!empty($socid) ?
'&socid=' . $socid :
'') .
'">' . $langs->trans(
"BackToList") .
'</a>';
479 $morehtmlref =
'<div class="refid">';
480 $morehtmlref .=
$object->label;
481 $morehtmlref .=
'</div>';
482 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'rowid', $morehtmlref);
485 print
'<div class="fichecenter">';
486 print
'<div class="fichehalfleft">';
487 print
'<div class="underbanner clearboth"></div>';
488 print
'<table class="border centpercent tableforfield">' .
"\n";
490 $object->fields[
'label'][
'visible'] = 0;
491 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_view.tpl.php';
494 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
501 print
'<div class="clearboth"></div>';
510 if ($action !=
'presend' && $action !=
'editline') {
511 print
'<div class="tabsAction">' .
"\n";
512 $parameters = array();
513 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
515 setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
518 if (empty($reshook)) {
520 if (
$object->status == $object::STATUS_VALIDATED) {
521 print dolGetButtonAction($langs->trans(
'SetToDraft'),
'',
'default', $_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&action=confirm_setdraft&confirm=yes&token=' .
newToken(),
'', $permissiontoadd);
524 print dolGetButtonAction($langs->trans(
'Modify'),
'',
'default', $_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&action=edit&token=' .
newToken(),
'', $permissiontoadd);
527 if ($permissiontoadd) {
528 print dolGetButtonAction($langs->trans(
'ToClone'), $langs->trans(
'ToClone'),
'clone', $_SERVER[
"PHP_SELF"].
'?action=clone&token='.
newToken().
'&id='.
$object->id,
'',
true, array(
'attr' => array(
'class' =>
'reposition')));
531 print dolGetButtonAction($langs->trans(
'Delete'), $langs->trans(
'Delete'),
'delete', $_SERVER[
'PHP_SELF'] .
'?id=' .
$object->id .
'&action=delete&token=' .
newToken(),
'', $permissiontodelete, array(
'attr' => array(
'class' =>
'reposition'))).
"\n";
533 print
'</div>' .
"\n";
540if ($action !=
"create" && $action !=
"edit") {
541 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formcompany.class.php';
542 require_once DOL_DOCUMENT_ROOT .
'/core/lib/date.lib.php';
543 require_once DOL_DOCUMENT_ROOT .
'/core/lib/company.lib.php';
546 require_once __DIR__ .
'/class/skilldet.class.php';
551 $action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
552 $massaction =
GETPOST(
'massaction',
'alpha');
554 $confirm =
GETPOST(
'confirm',
'alpha');
555 $cancel =
GETPOST(
'cancel',
'alpha');
556 $toselect =
GETPOST(
'toselect',
'array:int');
557 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'skilldetlist';
558 $backtopage =
GETPOST(
'backtopage',
'alpha');
559 $optioncss =
GETPOST(
'optioncss',
'aZ');
565 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
566 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
568 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
572 $offset = $limit * $page;
573 $pageprev = $page - 1;
574 $pagenext = $page + 1;
583 reset($objectline->fields);
584 $sortfield =
"t." . key($objectline->fields);
591 $search_all =
GETPOST(
'search_all',
'alphanohtml');
593 foreach ($objectline->fields as $key => $val) {
594 if (
GETPOST(
'search_' . $key,
'alpha') !==
'') {
595 $search[$key] =
GETPOST(
'search_' . $key,
'alpha');
597 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
604 $fieldstosearchall = array();
605 foreach ($objectline->fields as $key => $val) {
606 if (!empty($val[
'searchall'])) {
607 $fieldstosearchall[
't.' . $key] = $val[
'label'];
612 $arrayfields = array();
613 foreach ($objectline->fields as $key => $val) {
615 if (!empty($val[
'visible'])) {
616 $visible = (int)
dol_eval((
string) $val[
'visible'], 1, 1,
'1');
617 $arrayfields[
't.' . $key] = array(
618 'label' => $val[
'label'],
619 'checked' => (($visible < 0) ? 0 : 1),
620 'enabled' => (abs($visible) != 3 && (bool)
dol_eval((string) $val[
'enabled'], 1)),
621 'position' => $val[
'position'],
622 'help' => isset($val[
'help']) ? $val[
'help'] :
''
627 $objectline->fields =
dol_sort_array($objectline->fields,
'position');
633 $form =
new Form($db);
638 $title = $langs->transnoentitiesnoconv(
"Skilldets");
641 $nbtotalofrecords =
'';
646 $sql .= $objectline->getFieldList(
't');
647 $sql .=
" FROM " . MAIN_DB_PREFIX . $objectline->table_element .
" as t";
648 if ($objectline->ismultientitymanaged == 1) {
649 $sql .=
" WHERE t.entity IN (" .
getEntity($objectline->element) .
")";
651 $sql .=
" WHERE 1 = 1 ";
653 $sql .=
" AND fk_skill = ".((int) $id);
654 $sql .=
" AND rankorder <> 0";
656 $resql = $db->query($sql);
657 $nbtotalofrecords = $db->num_rows($resql);
658 $num = $db->num_rows($resql);
660 print
'<form method="POST" id="searchFormList" action="' . $_SERVER[
"PHP_SELF"] .
'">' .
"\n";
661 if ($optioncss !=
'') {
662 print
'<input type="hidden" name="optioncss" value="' . $optioncss .
'">';
664 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
665 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
666 print
'<input type="hidden" name="action" value="list">';
667 print
'<input type="hidden" name="sortfield" value="' . $sortfield .
'">';
668 print
'<input type="hidden" name="sortorder" value="' . $sortorder .
'">';
669 print
'<input type="hidden" name="page" value="' . $page .
'">';
670 print
'<input type="hidden" name="contextpage" value="' . $contextpage .
'">';
672 print
'<input type="hidden" name="id" value="' .
$id .
'">';
675 $param_fk =
"&fk_skill=" .
$id .
"&fk_user_creat=" . $user->id;
678 $massactionbutton =
"";
681 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_' .
$object->picto, 0,
'',
'', 0, 0, 0, 1);
684 $topicmail =
"SendSkilldetRef";
685 $modelmail =
"skilldet";
687 $trackid =
'xxxx' .
$object->id;
691 foreach ($fieldstosearchall as $key => $val) {
692 $fieldstosearchall[$key] = $langs->trans($val);
694 print
'<div class="divsearchfieldfilter">' . $langs->trans(
"FilterOnInto", $search_all) . implode(
', ', $fieldstosearchall) .
'</div>';
702 $parameters = array();
703 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $objectline);
704 if (empty($reshook)) {
705 $moreforfilter .= $hookmanager->resPrint;
707 $moreforfilter = $hookmanager->resPrint;
710 if (!empty($moreforfilter)) {
711 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
712 print $moreforfilter;
716 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
720 print
'<div class="div-table-responsive">';
721 print
'<table class="tagtable nobottomiftotal liste' . ($moreforfilter ?
" listwithfilterbefore" :
"") .
'">' .
"\n";
726 print
'<tr class="liste_titre">';
727 foreach ($objectline->fields as $key => $val) {
738 if (!empty($arrayfields[
't.' . $key][
'checked'])) {
739 print
getTitleFieldOfList($arrayfields[
't.' . $key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.' . $key,
'', $param, (!empty($cssforfield) ?
'class="' . $cssforfield .
'"' :
''), $sortfield, $sortorder, (!empty($cssforfield) ? $cssforfield .
' ' :
'')) .
"\n";
744 print
'</tr>' .
"\n";
751 $totalarray = array();
752 $totalarray[
'nbfield'] = 0;
753 while ($i < ($limit ? min($num, $limit) : $num)) {
754 $obj = $db->fetch_object($resql);
759 if ($obj->rankorder > $MaxNumberSkill) {
764 $objectline->setVarsFromFetchObj($obj);
767 print
'<tr class="oddeven">';
768 foreach ($objectline->fields as $key => $val) {
787 if (!empty($arrayfields[
't.' . $key][
'checked'])) {
788 print
'<td' . (empty($cssforfield) ?
'' :
' class="' . $cssforfield .
'"') .
'>';
789 if ($key ==
'status') {
790 print $objectline->getLibStatut(5);
791 } elseif ($key ==
'rowid') {
792 print $objectline->showOutputField($val, $key, (
string) $objectline->id,
'');
794 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>';
796 print $objectline->showOutputField($val, $key, $objectline->$key,
'');
802 $totalarray[
'nbfield']++;
804 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
806 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.' . $key;
808 if (!isset($totalarray[
'val'])) {
809 $totalarray[
'val'] = array();
811 if (!isset($totalarray[
'val'][
't.' . $key])) {
812 $totalarray[
'val'][
't.' . $key] = 0;
814 $totalarray[
'val'][
't.' . $key] += $objectline->$key;
836 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $objectline,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
837 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $objectline);
838 print $hookmanager->resPrint;
844 $totalarray[
'nbfield']++;
847 print
'</tr>' .
"\n";
857 foreach ($arrayfields as $key => $val) {
858 if (!empty($val[
'checked'])) {
862 print
'<tr><td colspan="' . $colspan .
'"><span class="opacitymedium">' . $langs->trans(
"NoRecordFound") .
'</span></td></tr>';
865 if (!empty($resql)) {
869 $parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
870 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $objectline);
871 print $hookmanager->resPrint;
873 print
'</table>' .
"\n";
874 print
'</div>' .
"\n";
876 print
'</form>' .
"\n";
898 print
'<div class="fichecenter"><div class="fichehalfleft">';
901 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'skill'), 1);
902 $linktoelem = $tmparray[
'linktoelem'];
903 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
904 print $htmltoenteralink;
906 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
908 print
'</div><div class="fichehalfright">';
912 $morehtmlcenter =
dolGetButtonTitle($langs->trans(
'SeeAll'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/hrm/skill_agenda.php?id='.
$object->id);
915 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formactions.class.php';
917 $somethingshown = $formactions->showactions($object,
$object->element .
'@' .
$object->module, (is_object(
$object->thirdparty) ?
$object->thirdparty->id : 0), 1,
'', $MAXEVENT,
'', $morehtmlcenter);
919 print
'</div></div>';
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
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.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
dol_now($mode='gmt')
Return date for now.
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...
dolBuildUrl($url, $params=[], $addtoken=false, $anchor='')
Return path of url.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
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'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
getEntity($element, $shared=1, $currentobject=null)
Get list of entity id to use.
skillPrepareHead($object)
Prepare array of tabs for Skill.
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.
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.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.