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();
117$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
122if (empty($reshook)) {
125 $backurlforlist = DOL_URL_ROOT.
'/hrm/skill_list.php';
127 if (empty($backtopage) || ($cancel && empty($id))) {
128 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
129 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
130 $backtopage = $backurlforlist;
132 $backtopage = DOL_URL_ROOT.
'/hrm/skill_card.php?id=' . (
$id > 0 ?
$id :
'__ID__');
137 $triggermodname =
'HRM_SKILL_MODIFY';
140 $skilldetArray =
GETPOST(
"descriptionline",
"array:alphanohtml");
143 if (is_array($skilldetArray) && count($skilldetArray) > 0) {
144 if ($action ==
'update' && $permissiontoadd) {
145 foreach ($skilldetArray as $key => $SkValueToUpdate) {
147 $res = $skilldetObj->fetch($key);
149 $skilldetObj->description = $SkValueToUpdate;
150 $resupd = $skilldetObj->update($user);
163 if (in_array($action, array(
"confirm_delete",
"update"))) {
167 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
170 if (is_array($skilldetArray) && count($skilldetArray) > 0) {
171 if ($action ==
'add' && $permissiontoadd) {
172 $arraySkill =
$object->fetchLines();
173 '@phan-var-force Skilldet[] $arraySkill';
176 foreach ($arraySkill as $skilldet) {
177 if ($skilldet->rankorder != 0) {
178 if (isset($skilldetArray[$index])) {
179 $SkValueToUpdate = $skilldetArray[$index];
180 $skilldet->description = !empty($SkValueToUpdate) ? $SkValueToUpdate : $skilldet->description;
181 $resupd = $skilldet->update($user);
189 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?id=".
$object->id);
197 include DOL_DOCUMENT_ROOT .
'/core/actions_dellink.inc.php';
200 include DOL_DOCUMENT_ROOT .
'/core/actions_printing.inc.php';
206 include DOL_DOCUMENT_ROOT .
'/core/actions_builddoc.inc.php';
208 if ($action ==
'set_thirdparty' && $permissiontoadd) {
209 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
211 if ($action ==
'classin' && $permissiontoadd) {
216 $triggersendname =
'HRM_SKILL_SENTBYMAIL';
217 $autocopy =
'MAIN_MAIL_AUTOCOPY_SKILL_TO';
218 $trackid =
'skill' .
$object->id;
219 include DOL_DOCUMENT_ROOT .
'/core/actions_sendmails.inc.php';
221 if ($action ==
'confirm_clone' && $confirm !=
'yes') {
225 if ($action ==
'confirm_clone' && $confirm ==
'yes' && $permissiontoadd && is_object($result)) {
226 '@phan-var-force Skill $result';
228 $clonelabel =
GETPOST(
'clone_label',
'alphanohtml');
229 if ($clonelabel !==
'' && $clonelabel !== $result->label) {
230 if ($result->setValueFrom(
'label', $clonelabel,
'',
null,
'text',
'', $user) < 0) {
234 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?id=".$result->id);
244$form =
new Form($db);
248$title = $langs->trans(
"Skill");
254if ($action ==
'create') {
257 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
258 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
259 print
'<input type="hidden" name="action" value="add">';
260 $backtopage .= (strpos($backtopage,
'?') > 0 ?
'&' :
'?') .
"objecttype=job";
262 print
'<input type="hidden" name="backtopage" value="' . $backtopage .
'">';
264 if ($backtopageforcancel) {
265 print
'<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel .
'">';
270 print
'<table class="border centpercent tableforfieldcreate">' .
"\n";
273 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_add.tpl.php';
276 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
283 print
'</table>' .
"\n";
286 print
'<table class="border centpercent =">' .
"\n";
287 for ($i = 1; $i <= $MaxNumberSkill; $i++) {
288 print
'<tr><td class="titlefieldcreate tdtop">'. $langs->trans(
'Description') .
' ' . $langs->trans(
'rank') .
' ' . $i .
'</td>';
289 print
'<td class="valuefieldcreate"><textarea name="descriptionline[]" rows="5" class="flat minwidth100" style="margin-top: 5px; width: 90%"></textarea></td>';
295 print
'<div class="center">';
296 print
'<input type="submit" class="button" name="add" value="' .
dol_escape_htmltag($langs->trans(
"Create")) .
'">';
298 print
'<input type="' . ($backtopage ?
"submit" :
"button") .
'" class="button button-cancel" name="cancel" value="' .
dol_escape_htmltag($langs->trans(
"Cancel")) .
'"' . ($backtopage ?
'' :
' onclick="history.go(-1)"') .
'>';
308if (($id || $ref) && $action ==
'edit') {
311 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
312 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
313 print
'<input type="hidden" name="action" value="update">';
314 print
'<input type="hidden" name="id" value="' .
$object->id .
'">';
316 print
'<input type="hidden" name="backtopage" value="' . $backtopage .
'">';
318 if ($backtopageforcancel) {
319 print
'<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel .
'">';
324 print
'<table class="border centpercent tableforfieldedit">' .
"\n";
327 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_edit.tpl.php';
330 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
337 $SkilldetRecords =
$object->fetchLines();
338 '@phan-var-force Skilldet[] $SkilldetRecords';
340 if (is_array($SkilldetRecords) && count($SkilldetRecords) == 0) {
344 if (is_array($SkilldetRecords) && count($SkilldetRecords) > 0) {
346 foreach ($SkilldetRecords as $sk) {
347 if ($sk->rankorder > $MaxNumberSkill) {
351 print
'<table class="border centpercent =">' .
"\n";
353 foreach ($sk->fields as $key => $val) {
354 if (abs($val[
'visible']) != 1 && abs($val[
'visible']) != 3 && abs($val[
'visible']) != 4) {
358 if (array_key_exists(
'enabled', $val) && isset($val[
'enabled']) && !
verifCond($val[
'enabled'])) {
362 print
'<tr class="field_' . $key .
'"><td';
363 print
' class="titlefieldcreate';
364 if (isset($val[
'notnull']) && $val[
'notnull'] > 0) {
365 print
' fieldrequired';
367 if (preg_match(
'/^(text|html)/', $val[
'type'])) {
374 print $langs->trans($val[
'label']).
' '.$langs->trans(
'rank').
' '.$sk->rankorder;
377 print
'<td class="valuefieldcreate">';
392 $check =
'restricthtml';
394 $skilldetArray =
GETPOST(
"descriptionline",
"array");
395 if (empty($skilldetArray)) {
396 $value = GETPOSTISSET($key) ?
GETPOST($key, $check) : $sk->$key;
398 $value = $skilldetArray[$sk->id];
407 if (!empty($val[
'noteditable'])) {
408 print $sk->showOutputField($val, $key, $value,
'',
'',
'', 0);
411 print $sk->showInputField($val, $key, $value,
"",
"line[" . $sk->id .
"]",
"",
"");
423 print
'<div class="center"><input type="submit" class="button button-save" name="save" value="' . $langs->trans(
"Save") .
'">';
424 print
' <input type="submit" class="button button-cancel" name="cancel" value="' . $langs->trans(
"Cancel") .
'">';
432if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
433 $res =
$object->fetch_optionals();
441 if ($action ==
'delete') {
442 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id, $langs->trans(
'DeleteSkill'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
445 if ($action ==
'deleteline') {
446 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&lineid=' . $lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
449 if ($action ===
'clone') {
450 $formquestion = array(
451 array(
'type' =>
'text',
'name' =>
'clone_label',
'label' => $langs->trans(
"Label"),
'value' => $langs->trans(
"CopyOf").
' '.
$object->label),
453 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->label),
'confirm_clone', $formquestion,
'yes', 1, 280);
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');
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((string) $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";
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, (
string) $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,
'');
799 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
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;
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>';
$id
Support class for third parties, contacts, members, users or resources.
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $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.
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, $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.
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.