30 require
'../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formcompany.class.php';
32 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formfile.class.php';
33 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formprojet.class.php';
34 require_once DOL_DOCUMENT_ROOT .
'/hrm/class/skill.class.php';
35 require_once DOL_DOCUMENT_ROOT .
'/hrm/lib/hrm_skill.lib.php';
39 $langs->loadLangs(array(
"hrm",
"other",
'products'));
44 $action =
GETPOST(
'action',
'aZ09');
45 $confirm =
GETPOST(
'confirm',
'alpha');
46 $cancel =
GETPOST(
'cancel',
'aZ09');
47 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'skillcard';
48 $backtopage =
GETPOST(
'backtopage',
'alpha');
49 $backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
53 $object =
new Skill($db);
56 $hookmanager->initHooks(array(
'skillcard',
'globalcard'));
59 $extrafields->fetch_name_optionals_label($object->table_element);
61 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
65 $search_all =
GETPOST(
"search_all",
'alpha');
67 foreach ($object->fields as $key => $val) {
68 if (
GETPOST(
'search_' . $key,
'alpha')) {
69 $search[$key] =
GETPOST(
'search_' . $key,
'alpha');
73 if (empty($action) && empty($id) && empty($ref)) {
78 include DOL_DOCUMENT_ROOT .
'/core/actions_fetchobject.inc.php';
81 $permissiontoread = $user->rights->hrm->all->read;
82 $permissiontoadd = $user->rights->hrm->all->write;
83 $permissiontodelete = $user->rights->hrm->all->delete;
84 $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] .
'/skill';
92 if (!$permissiontoread || ($action ===
'create' && !$permissiontoadd))
accessforbidden();
94 $MaxNumberSkill = isset($conf->global->HRM_MAXRANK) ? $conf->global->HRM_MAXRANK : Skill::DEFAULT_MAX_RANK_PER_SKILL;
101 $parameters = array();
102 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
107 if (empty($reshook)) {
110 $backurlforlist = DOL_URL_ROOT.
'/hrm/skill_list.php';
112 if (empty($backtopage) || ($cancel && empty($id))) {
113 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
114 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
115 $backtopage = $backurlforlist;
117 $backtopage = DOL_URL_ROOT.
'/hrm/skill_card.php?id=' . ($id > 0 ? $id :
'__ID__');
122 $triggermodname =
'hrm_SKILL_MODIFY';
127 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
130 $skilldetArray =
GETPOST(
"descriptionline",
"array:alphanohtml");
133 if (is_array($skilldetArray) && count($skilldetArray) > 0) {
134 foreach ($skilldetArray as $key => $SkValueToUpdate) {
135 $skilldetObj =
new Skilldet($object->db);
136 $res = $skilldetObj->fetch($key);
138 $skilldetObj->description = $SkValueToUpdate;
139 $resupd = $skilldetObj->update($user);
150 include DOL_DOCUMENT_ROOT .
'/core/actions_dellink.inc.php';
153 include DOL_DOCUMENT_ROOT .
'/core/actions_printing.inc.php';
159 include DOL_DOCUMENT_ROOT .
'/core/actions_builddoc.inc.php';
161 if ($action ==
'set_thirdparty' && $permissiontoadd) {
162 $object->setValueFrom(
'fk_soc',
GETPOST(
'fk_soc',
'int'),
'',
'',
'date',
'', $user, $triggermodname);
164 if ($action ==
'classin' && $permissiontoadd) {
165 $object->setProject(
GETPOST(
'projectid',
'int'));
169 $triggersendname =
'hrm_SKILL_SENTBYMAIL';
170 $autocopy =
'MAIN_MAIL_AUTOCOPY_SKILL_TO';
171 $trackid =
'skill' . $object->id;
172 include DOL_DOCUMENT_ROOT .
'/core/actions_sendmails.inc.php';
184 $title = $langs->trans(
"skill");
190 if ($action ==
'create') {
191 print
load_fiche_titre($langs->trans(
"NewSkill"),
'',
'object_' . $object->picto);
193 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
194 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
195 print
'<input type="hidden" name="action" value="add">';
196 $backtopage .= (strpos($backtopage,
'?') > 0 ?
'&' :
'?' ) .
"objecttype=job";
198 print
'<input type="hidden" name="backtopage" value="' . $backtopage .
'">';
200 if ($backtopageforcancel) {
201 print
'<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel .
'">';
206 print
'<table class="border centpercent tableforfieldcreate">' .
"\n";
209 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_add.tpl.php';
212 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
219 print
'</table>' .
"\n";
223 print
'<div class="center">';
224 print
'<input type="submit" class="button" name="add" value="' .
dol_escape_htmltag($langs->trans(
"Create")) .
'">';
227 print
'<input type="' . ($backtopage ?
"submit" :
"button") .
'" class="button button-cancel" name="cancel" value="' .
dol_escape_htmltag($langs->trans(
"Cancel")) .
'"' . ($backtopage ?
'' :
' onclick="javascript:history.go(-1)"') .
'>';
237 if (($id || $ref) && $action ==
'edit') {
238 print
load_fiche_titre($langs->trans(
"Skill"),
'',
'object_' . $object->picto);
240 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
241 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
242 print
'<input type="hidden" name="action" value="update">';
243 print
'<input type="hidden" name="id" value="' . $object->id .
'">';
245 print
'<input type="hidden" name="backtopage" value="' . $backtopage .
'">';
247 if ($backtopageforcancel) {
248 print
'<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel .
'">';
253 print
'<table class="border centpercent tableforfieldedit">' .
"\n";
256 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_edit.tpl.php';
261 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
267 $SkilldetRecords = $object->fetchLines();
269 if (is_array($SkilldetRecords) && count($SkilldetRecords) == 0) {
270 $object->createSkills(1);
273 if (is_array($SkilldetRecords) && count($SkilldetRecords) > 0) {
275 foreach ($SkilldetRecords as $sk) {
276 if ($sk->rankorder > $MaxNumberSkill) {
280 print
'<table class="border centpercent =">' .
"\n";
282 foreach ($sk->fields as $key => $val) {
283 if (abs($val[
'visible']) != 1 && abs($val[
'visible']) != 3 && abs($val[
'visible']) != 4) {
287 if (array_key_exists(
'enabled', $val) && isset($val[
'enabled']) && !
verifCond($val[
'enabled'])) {
291 print
'<tr class="field_' . $key .
'"><td';
292 print
' class="titlefieldcreate';
293 if (isset($val[
'notnull']) && $val[
'notnull'] > 0) {
294 print
' fieldrequired';
296 if (preg_match(
'/^(text|html)/', $val[
'type'])) {
303 print $langs->trans($val[
'label']).
' '.$langs->trans(
'rank').
' '.$sk->rankorder;
306 print
'<td class="valuefieldcreate">';
316 if (!empty($tmparray[1])) {
317 $check = $tmparray[1];
319 $check =
'restricthtml';
322 $skilldetArray =
GETPOST(
"descriptionline",
"array");
323 if (empty($skilldetArray)) {
326 $value=$skilldetArray[$sk->id];
335 if ($val[
'noteditable']) {
336 print $sk->showOutputField($val, $key, $value,
'',
'',
'', 0);
339 print $sk->showInputField($val, $key, $value,
"",
"line[" . $sk->id .
"]",
"",
"");
351 print
'<div class="center"><input type="submit" class="button button-save" name="save" value="' . $langs->trans(
"Save") .
'">';
352 print
' <input type="submit" class="button button-cancel" name="cancel" value="' . $langs->trans(
"Cancel") .
'">';
360 if ($object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
361 $res = $object->fetch_optionals();
364 print
dol_get_fiche_head($head,
'card', $langs->trans(
"Workstation"), -1, $object->picto);
369 if ($action ==
'delete') {
370 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' . $object->id, $langs->trans(
'DeleteSkill'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
373 if ($action ==
'deleteline') {
374 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' . $object->id .
'&lineid=' . $lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
377 if ($action ==
'clone') {
379 $formquestion = array();
380 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' . $object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk', $object->ref),
'confirm_clone', $formquestion,
'yes', 1);
384 if ($action ==
'xxx') {
385 $formquestion = array();
396 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' . $object->id, $langs->trans(
'XXX'), $text,
'confirm_xxx', $formquestion, 0, 1, 220);
400 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
401 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
402 if (empty($reshook)) {
403 $formconfirm .= $hookmanager->resPrint;
404 } elseif ($reshook > 0) {
405 $formconfirm = $hookmanager->resPrint;
414 $linkback =
'<a href="' . DOL_URL_ROOT.
'/hrm/skill_list.php?restore_lastsearch_values=1' . (!empty($socid) ?
'&socid=' . $socid :
'') .
'">' . $langs->trans(
"BackToList") .
'</a>';
417 $morehtmlref =
'<div class="refid">';
418 $morehtmlref.= $object->label;
419 $morehtmlref .=
'</div>';
420 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'rowid', $morehtmlref);
423 print
'<div class="fichecenter">';
424 print
'<div class="fichehalfleft">';
425 print
'<div class="underbanner clearboth"></div>';
426 print
'<table class="border centpercent tableforfield">' .
"\n";
428 $object->fields[
'label'][
'visible']=0;
429 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_view.tpl.php';
432 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
439 print
'<div class="clearboth"></div>';
448 if ($action !=
'presend' && $action !=
'editline') {
449 print
'<div class="tabsAction">' .
"\n";
450 $parameters = array();
451 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
456 if (empty($reshook)) {
458 if ($object->status == $object::STATUS_VALIDATED) {
459 print
dolGetButtonAction($langs->trans(
'SetToDraft'),
'',
'default', $_SERVER[
"PHP_SELF"] .
'?id=' . $object->id .
'&action=confirm_setdraft&confirm=yes&token=' .
newToken(),
'', $permissiontoadd);
462 print
dolGetButtonAction($langs->trans(
'Modify'),
'',
'default', $_SERVER[
"PHP_SELF"] .
'?id=' . $object->id .
'&action=edit&token=' .
newToken(),
'', $permissiontoadd);
465 print
dolGetButtonAction($langs->trans(
'Delete'),
'',
'delete', $_SERVER[
'PHP_SELF'] .
'?id=' . $object->id .
'&action=delete&token=' .
newToken(),
'', $permissiontodelete);
467 print
'</div>' .
"\n";
477 if ($action !=
"create" && $action !=
"edit") {
478 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formcompany.class.php';
479 require_once DOL_DOCUMENT_ROOT .
'/core/lib/date.lib.php';
480 require_once DOL_DOCUMENT_ROOT .
'/core/lib/company.lib.php';
483 require_once __DIR__ .
'/class/skilldet.class.php';
488 $action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
489 $massaction =
GETPOST(
'massaction',
'alpha');
490 $show_files =
GETPOST(
'show_files',
'int');
491 $confirm =
GETPOST(
'confirm',
'alpha');
492 $cancel =
GETPOST(
'cancel',
'alpha');
493 $toselect =
GETPOST(
'toselect',
'array');
494 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'skilldetlist';
495 $backtopage =
GETPOST(
'backtopage',
'alpha');
496 $optioncss =
GETPOST(
'optioncss',
'aZ');
502 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
503 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
505 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
509 $offset = $limit * $page;
510 $pageprev = $page - 1;
511 $pagenext = $page + 1;
520 reset($objectline->fields);
521 $sortfield =
"t." . key($objectline->fields);
528 $search_all =
GETPOST(
'search_all',
'alphanohtml') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml');
530 foreach ($objectline->fields as $key => $val) {
531 if (
GETPOST(
'search_' . $key,
'alpha') !==
'') {
532 $search[$key] =
GETPOST(
'search_' . $key,
'alpha');
534 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
535 $search[$key .
'_dtstart'] =
dol_mktime(0, 0, 0,
GETPOST(
'search_' . $key .
'_dtstartmonth',
'int'),
GETPOST(
'search_' . $key .
'_dtstartday',
'int'),
GETPOST(
'search_' . $key .
'_dtstartyear',
'int'));
536 $search[$key .
'_dtend'] =
dol_mktime(23, 59, 59,
GETPOST(
'search_' . $key .
'_dtendmonth',
'int'),
GETPOST(
'search_' . $key .
'_dtendday',
'int'),
GETPOST(
'search_' . $key .
'_dtendyear',
'int'));
541 $fieldstosearchall = array();
542 foreach ($objectline->fields as $key => $val) {
543 if (!empty($val[
'searchall'])) {
544 $fieldstosearchall[
't.' . $key] = $val[
'label'];
549 $arrayfields = array();
550 foreach ($objectline->fields as $key => $val) {
552 if (!empty($val[
'visible'])) {
553 $visible = (int)
dol_eval($val[
'visible'], 1, 1,
'1');
554 $arrayfields[
't.' . $key] = array(
555 'label' => $val[
'label'],
556 'checked' => (($visible < 0) ? 0 : 1),
557 'enabled' => ($visible != 3 &&
dol_eval($val[
'enabled'], 1, 1,
'1')),
558 'position' => $val[
'position'],
559 'help' => isset($val[
'help']) ? $val[
'help'] :
''
564 $objectline->fields =
dol_sort_array($objectline->fields,
'position');
577 $title = $langs->transnoentitiesnoconv(
"Skilldets");
585 $sql .= $objectline->getFieldList(
't');
586 $sql .=
" FROM " . MAIN_DB_PREFIX . $objectline->table_element .
" as t";
587 if ($objectline->ismultientitymanaged == 1) {
588 $sql .=
" WHERE t.entity IN (" .
getEntity($objectline->element) .
")";
590 $sql .=
" WHERE 1 = 1 ";
594 $sql .=
" AND fk_skill = " . ((int) $id) .
" ";
598 if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) {
599 $num = $nbtotalofrecords;
602 $sql .= $db->plimit($limit + 1, $offset);
605 $resql = $db->query($sql);
611 $num = $db->num_rows(
$resql);
614 print
'<form method="POST" id="searchFormList" action="' . $_SERVER[
"PHP_SELF"] .
'">' .
"\n";
615 if ($optioncss !=
'') {
616 print
'<input type="hidden" name="optioncss" value="' . $optioncss .
'">';
618 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
619 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
620 print
'<input type="hidden" name="action" value="list">';
621 print
'<input type="hidden" name="sortfield" value="' . $sortfield .
'">';
622 print
'<input type="hidden" name="sortorder" value="' . $sortorder .
'">';
623 print
'<input type="hidden" name="page" value="' . $page .
'">';
624 print
'<input type="hidden" name="contextpage" value="' . $contextpage .
'">';
626 print
'<input type="hidden" name="id" value="' . $id .
'">';
629 $param_fk =
"&fk_skill=" . $id .
"&fk_user_creat=" . $user->rowid;
630 $backtopage =
dol_buildpath(
'/hrm/skill_card.php', 1) .
'?id=' . $id;
633 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_' . $object->picto, 0,
"",
'',
'', 0, 0, 1);
636 $topicmail =
"SendSkilldetRef";
637 $modelmail =
"skilldet";
639 $trackid =
'xxxx' . $object->id;
643 foreach ($fieldstosearchall as $key => $val) {
644 $fieldstosearchall[$key] = $langs->trans($val);
646 print
'<div class="divsearchfieldfilter">' . $langs->trans(
"FilterOnInto", $search_all) . join(
', ', $fieldstosearchall) .
'</div>';
654 $parameters = array();
655 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $objectline);
656 if (empty($reshook)) {
657 $moreforfilter .= $hookmanager->resPrint;
659 $moreforfilter = $hookmanager->resPrint;
662 if (!empty($moreforfilter)) {
663 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
664 print $moreforfilter;
668 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
672 print
'<div class="div-table-responsive">';
673 print
'<table class="tagtable nobottomiftotal liste' . ($moreforfilter ?
" listwithfilterbefore" :
"") .
'">' .
"\n";
678 print
'<tr class="liste_titre">';
679 foreach ($objectline->fields as $key => $val) {
690 if (!empty($arrayfields[
't.' . $key][
'checked'])) {
691 print
getTitleFieldOfList($arrayfields[
't.' . $key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.' . $key,
'', $param, ($cssforfield ?
'class="' . $cssforfield .
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield .
' ' :
'')) .
"\n";
696 print
'</tr>' .
"\n";
703 $totalarray = array();
704 $totalarray[
'nbfield'] = 0;
705 while ($i < ($limit ? min($num, $limit) : $num)) {
706 $obj = $db->fetch_object(
$resql);
711 if ($obj->rankorder > $MaxNumberSkill) {
716 $objectline->setVarsFromFetchObj($obj);
719 print
'<tr class="oddeven">';
720 foreach ($objectline->fields as $key => $val) {
739 if (!empty($arrayfields[
't.' . $key][
'checked'])) {
740 print
'<td' . ($cssforfield ?
' class="' . $cssforfield .
'"' :
'') .
'>';
741 if ($key ==
'status') {
742 print $objectline->getLibStatut(5);
743 } elseif ($key ==
'rowid') {
744 print $objectline->showOutputField($val, $key, $objectline->id,
'');
746 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>';
748 print $objectline->showOutputField($val, $key, $objectline->$key,
'');
754 $totalarray[
'nbfield']++;
756 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
758 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.' . $key;
760 if (!isset($totalarray[
'val'])) {
761 $totalarray[
'val'] = array();
763 if (!isset($totalarray[
'val'][
't.' . $key])) {
764 $totalarray[
'val'][
't.' . $key] = 0;
766 $totalarray[
'val'][
't.' . $key] += $objectline->$key;
788 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $objectline,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
789 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $objectline);
790 print $hookmanager->resPrint;
796 $totalarray[
'nbfield']++;
799 print
'</tr>' .
"\n";
809 foreach ($arrayfields as $key => $val) {
810 if (!empty($val[
'checked'])) {
814 print
'<tr><td colspan="' . $colspan .
'" class="opacitymedium">' . $langs->trans(
"NoRecordFound") .
'</td></tr>';
820 $parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
821 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $objectline);
822 print $hookmanager->resPrint;
824 print
'</table>' .
"\n";
825 print
'</div>' .
"\n";
827 print
'</form>' .
"\n";
849 print
'<div class="fichecenter"><div class="fichehalfleft">';
852 $linktoelem =
$form->showLinkToObjectBlock($object, null, array(
'skill'));
853 $somethingshown =
$form->showLinkedObjectBlock($object, $linktoelem);
855 print
'</div><div class="fichehalfright">';
859 $morehtmlcenter =
dolGetButtonTitle($langs->trans(
'SeeAll'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/hrm/skill_agenda.php?id='.$object->id);
862 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formactions.class.php';
864 $somethingshown =
$formactions->showactions($object, $object->element .
'@' . $object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1,
'', $MAXEVENT,
'', $morehtmlcenter);
866 print
'</div></div>';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if(preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if(preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if($action== 'set') elseif($action== 'specimen') elseif($action== 'setmodel') elseif($action== 'del') elseif($action== 'setdoc') $formactions
View.
if($cancel &&!$id) if($action== 'add'&&!$cancel) if($action== 'delete') if($id) $form
Actions.
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...
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_now($mode= 'auto')
Return date for now.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
setEventMessage($mesgs, $style= 'mesgs')
Set event message in dol_events session object.
dolGetButtonAction($label, $html= '', $actionType= 'default', $url= '', $id= '', $userRight=1, $params=array())
Function dolGetButtonAction.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save"&&empty($cancel)) $help_url
View.
skillPrepareHead($object)
Prepare array of tabs for Skill.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
verifCond($strToEvaluate)
Verify if condition in string is ok or not.
dol_eval($s, $returnvalue=0, $hideerrors=1, $onlysimplestring= '1')
Replace eval function to add more security.
print_barre_liste($titre, $page, $file, $options= '', $sortfield= '', $sortorder= '', $morehtmlcenter= '', $num=-1, $totalnboflines= '', $picto= 'generic', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow= '')
Print a title with navigation controls for pagination.
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.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
if(isModEnabled('facture')&&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur')&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)&&$user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice')&&$user->rights->supplier_invoice->lire)) if(isModEnabled('don')&&!empty($user->rights->don->lire)) if(isModEnabled('tax')&&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture')&&isModEnabled('commande')&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
dol_sort_array(&$array, $index, $order= 'asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
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...
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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.
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.
$formconfirm
if ($action == 'delbookkeepingyear') {