31 require
'../main.inc.php';
32 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formcompany.class.php';
33 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formfile.class.php';
34 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formprojet.class.php';
35 require_once DOL_DOCUMENT_ROOT .
'/hrm/class/skill.class.php';
36 require_once DOL_DOCUMENT_ROOT .
'/hrm/lib/hrm_skill.lib.php';
40 $langs->loadLangs(array(
'hrm',
'other',
'products'));
45 $action =
GETPOST(
'action',
'aZ09');
46 $confirm =
GETPOST(
'confirm',
'alpha');
47 $cancel =
GETPOST(
'cancel',
'aZ09');
48 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'skillcard';
49 $backtopage =
GETPOST(
'backtopage',
'alpha');
50 $backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
51 $lineid =
GETPOST(
'lineid',
'int');
54 $object =
new Skill($db);
57 $hookmanager->initHooks(array(
'skillcard',
'globalcard'));
60 $extrafields->fetch_name_optionals_label($object->table_element);
62 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
66 $search_all =
GETPOST(
"search_all",
'alpha');
68 foreach ($object->fields as $key => $val) {
69 if (
GETPOST(
'search_' . $key,
'alpha')) {
70 $search[$key] =
GETPOST(
'search_' . $key,
'alpha');
74 if (empty($action) && empty($id) && empty($ref)) {
79 include DOL_DOCUMENT_ROOT .
'/core/actions_fetchobject.inc.php';
82 $permissiontoread = $user->rights->hrm->all->read;
83 $permissiontoadd = $user->rights->hrm->all->write;
84 $permissiontodelete = $user->rights->hrm->all->delete;
85 $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] .
'/skill';
93 if (!$permissiontoread || ($action ===
'create' && !$permissiontoadd))
accessforbidden();
95 $MaxNumberSkill = isset($conf->global->HRM_MAXRANK) ? $conf->global->HRM_MAXRANK : Skill::DEFAULT_MAX_RANK_PER_SKILL;
102 $parameters = array();
103 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
108 if (empty($reshook)) {
111 $backurlforlist = DOL_URL_ROOT.
'/hrm/skill_list.php';
113 if (empty($backtopage) || ($cancel && empty($id))) {
114 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
115 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
116 $backtopage = $backurlforlist;
118 $backtopage = DOL_URL_ROOT.
'/hrm/skill_card.php?id=' . ($id > 0 ? $id :
'__ID__');
123 $triggermodname =
'hrm_SKILL_MODIFY';
128 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
131 $skilldetArray =
GETPOST(
"descriptionline",
"array:alphanohtml");
134 if (is_array($skilldetArray) && count($skilldetArray) > 0) {
135 foreach ($skilldetArray as $key => $SkValueToUpdate) {
136 $skilldetObj =
new Skilldet($object->db);
137 $res = $skilldetObj->fetch($key);
139 $skilldetObj->description = $SkValueToUpdate;
140 $resupd = $skilldetObj->update($user);
151 include DOL_DOCUMENT_ROOT .
'/core/actions_dellink.inc.php';
154 include DOL_DOCUMENT_ROOT .
'/core/actions_printing.inc.php';
160 include DOL_DOCUMENT_ROOT .
'/core/actions_builddoc.inc.php';
162 if ($action ==
'set_thirdparty' && $permissiontoadd) {
163 $object->setValueFrom(
'fk_soc',
GETPOST(
'fk_soc',
'int'),
'',
'',
'date',
'', $user, $triggermodname);
165 if ($action ==
'classin' && $permissiontoadd) {
166 $object->setProject(
GETPOST(
'projectid',
'int'));
170 $triggersendname =
'hrm_SKILL_SENTBYMAIL';
171 $autocopy =
'MAIN_MAIL_AUTOCOPY_SKILL_TO';
172 $trackid =
'skill' . $object->id;
173 include DOL_DOCUMENT_ROOT .
'/core/actions_sendmails.inc.php';
185 $title = $langs->trans(
"skill");
191 if ($action ==
'create') {
192 print
load_fiche_titre($langs->trans(
"NewSkill"),
'',
'object_' . $object->picto);
194 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
195 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
196 print
'<input type="hidden" name="action" value="add">';
197 $backtopage .= (strpos($backtopage,
'?') > 0 ?
'&' :
'?' ) .
"objecttype=job";
199 print
'<input type="hidden" name="backtopage" value="' . $backtopage .
'">';
201 if ($backtopageforcancel) {
202 print
'<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel .
'">';
207 print
'<table class="border centpercent tableforfieldcreate">' .
"\n";
210 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_add.tpl.php';
213 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
220 print
'</table>' .
"\n";
224 print
'<div class="center">';
225 print
'<input type="submit" class="button" name="add" value="' .
dol_escape_htmltag($langs->trans(
"Create")) .
'">';
228 print
'<input type="' . ($backtopage ?
"submit" :
"button") .
'" class="button button-cancel" name="cancel" value="' .
dol_escape_htmltag($langs->trans(
"Cancel")) .
'"' . ($backtopage ?
'' :
' onclick="history.go(-1)"') .
'>';
238 if (($id || $ref) && $action ==
'edit') {
239 print
load_fiche_titre($langs->trans(
"Skill"),
'',
'object_' . $object->picto);
241 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
242 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
243 print
'<input type="hidden" name="action" value="update">';
244 print
'<input type="hidden" name="id" value="' . $object->id .
'">';
246 print
'<input type="hidden" name="backtopage" value="' . $backtopage .
'">';
248 if ($backtopageforcancel) {
249 print
'<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel .
'">';
254 print
'<table class="border centpercent tableforfieldedit">' .
"\n";
257 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_edit.tpl.php';
262 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
268 $SkilldetRecords = $object->fetchLines();
270 if (is_array($SkilldetRecords) && count($SkilldetRecords) == 0) {
271 $object->createSkills(1);
274 if (is_array($SkilldetRecords) && count($SkilldetRecords) > 0) {
276 foreach ($SkilldetRecords as $sk) {
277 if ($sk->rankorder > $MaxNumberSkill) {
281 print
'<table class="border centpercent =">' .
"\n";
283 foreach ($sk->fields as $key => $val) {
284 if (abs($val[
'visible']) != 1 && abs($val[
'visible']) != 3 && abs($val[
'visible']) != 4) {
288 if (array_key_exists(
'enabled', $val) && isset($val[
'enabled']) && !
verifCond($val[
'enabled'])) {
292 print
'<tr class="field_' . $key .
'"><td';
293 print
' class="titlefieldcreate';
294 if (isset($val[
'notnull']) && $val[
'notnull'] > 0) {
295 print
' fieldrequired';
297 if (preg_match(
'/^(text|html)/', $val[
'type'])) {
304 print $langs->trans($val[
'label']).
' '.$langs->trans(
'rank').
' '.$sk->rankorder;
307 print
'<td class="valuefieldcreate">';
317 if (!empty($tmparray[1])) {
318 $check = $tmparray[1];
320 $check =
'restricthtml';
323 $skilldetArray =
GETPOST(
"descriptionline",
"array");
324 if (empty($skilldetArray)) {
327 $value=$skilldetArray[$sk->id];
336 if (!empty($val[
'noteditable'])) {
337 print $sk->showOutputField($val, $key, $value,
'',
'',
'', 0);
340 print $sk->showInputField($val, $key, $value,
"",
"line[" . $sk->id .
"]",
"",
"");
352 print
'<div class="center"><input type="submit" class="button button-save" name="save" value="' . $langs->trans(
"Save") .
'">';
353 print
' <input type="submit" class="button button-cancel" name="cancel" value="' . $langs->trans(
"Cancel") .
'">';
361 if ($object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
362 $res = $object->fetch_optionals();
365 print
dol_get_fiche_head($head,
'card', $langs->trans(
"Workstation"), -1, $object->picto);
370 if ($action ==
'delete') {
371 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' . $object->id, $langs->trans(
'DeleteSkill'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
374 if ($action ==
'deleteline') {
375 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' . $object->id .
'&lineid=' . $lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
378 if ($action ==
'clone') {
380 $formquestion = array();
381 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' . $object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk', $object->ref),
'confirm_clone', $formquestion,
'yes', 1);
385 if ($action ==
'xxx') {
386 $formquestion = array();
397 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' . $object->id, $langs->trans(
'XXX'), $text,
'confirm_xxx', $formquestion, 0, 1, 220);
401 $parameters = array(
'formConfirm' =>
$formconfirm,
'lineid' => $lineid);
402 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
403 if (empty($reshook)) {
405 } elseif ($reshook > 0) {
415 $linkback =
'<a href="' . DOL_URL_ROOT.
'/hrm/skill_list.php?restore_lastsearch_values=1' . (!empty($socid) ?
'&socid=' . $socid :
'') .
'">' . $langs->trans(
"BackToList") .
'</a>';
418 $morehtmlref =
'<div class="refid">';
419 $morehtmlref.= $object->label;
420 $morehtmlref .=
'</div>';
421 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'rowid', $morehtmlref);
424 print
'<div class="fichecenter">';
425 print
'<div class="fichehalfleft">';
426 print
'<div class="underbanner clearboth"></div>';
427 print
'<table class="border centpercent tableforfield">' .
"\n";
429 $object->fields[
'label'][
'visible']=0;
430 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_view.tpl.php';
433 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
440 print
'<div class="clearboth"></div>';
449 if ($action !=
'presend' && $action !=
'editline') {
450 print
'<div class="tabsAction">' .
"\n";
451 $parameters = array();
452 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
457 if (empty($reshook)) {
459 if ($object->status == $object::STATUS_VALIDATED) {
460 print
dolGetButtonAction($langs->trans(
'SetToDraft'),
'',
'default', $_SERVER[
"PHP_SELF"] .
'?id=' . $object->id .
'&action=confirm_setdraft&confirm=yes&token=' .
newToken(),
'', $permissiontoadd);
463 print
dolGetButtonAction($langs->trans(
'Modify'),
'',
'default', $_SERVER[
"PHP_SELF"] .
'?id=' . $object->id .
'&action=edit&token=' .
newToken(),
'', $permissiontoadd);
466 print
dolGetButtonAction($langs->trans(
'Delete'),
'',
'delete', $_SERVER[
'PHP_SELF'] .
'?id=' . $object->id .
'&action=delete&token=' .
newToken(),
'', $permissiontodelete);
468 print
'</div>' .
"\n";
478 if ($action !=
"create" && $action !=
"edit") {
479 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formcompany.class.php';
480 require_once DOL_DOCUMENT_ROOT .
'/core/lib/date.lib.php';
481 require_once DOL_DOCUMENT_ROOT .
'/core/lib/company.lib.php';
484 require_once __DIR__ .
'/class/skilldet.class.php';
489 $action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
490 $massaction =
GETPOST(
'massaction',
'alpha');
491 $show_files =
GETPOST(
'show_files',
'int');
492 $confirm =
GETPOST(
'confirm',
'alpha');
493 $cancel =
GETPOST(
'cancel',
'alpha');
494 $toselect =
GETPOST(
'toselect',
'array');
495 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'skilldetlist';
496 $backtopage =
GETPOST(
'backtopage',
'alpha');
497 $optioncss =
GETPOST(
'optioncss',
'aZ');
503 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
504 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
506 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
510 $offset = $limit * $page;
511 $pageprev = $page - 1;
512 $pagenext = $page + 1;
521 reset($objectline->fields);
522 $sortfield =
"t." . key($objectline->fields);
529 $search_all =
GETPOST(
'search_all',
'alphanohtml') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml');
531 foreach ($objectline->fields as $key => $val) {
532 if (
GETPOST(
'search_' . $key,
'alpha') !==
'') {
533 $search[$key] =
GETPOST(
'search_' . $key,
'alpha');
535 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
536 $search[$key .
'_dtstart'] =
dol_mktime(0, 0, 0,
GETPOST(
'search_' . $key .
'_dtstartmonth',
'int'),
GETPOST(
'search_' . $key .
'_dtstartday',
'int'),
GETPOST(
'search_' . $key .
'_dtstartyear',
'int'));
537 $search[$key .
'_dtend'] =
dol_mktime(23, 59, 59,
GETPOST(
'search_' . $key .
'_dtendmonth',
'int'),
GETPOST(
'search_' . $key .
'_dtendday',
'int'),
GETPOST(
'search_' . $key .
'_dtendyear',
'int'));
542 $fieldstosearchall = array();
543 foreach ($objectline->fields as $key => $val) {
544 if (!empty($val[
'searchall'])) {
545 $fieldstosearchall[
't.' . $key] = $val[
'label'];
550 $arrayfields = array();
551 foreach ($objectline->fields as $key => $val) {
553 if (!empty($val[
'visible'])) {
554 $visible = (int)
dol_eval($val[
'visible'], 1, 1,
'1');
555 $arrayfields[
't.' . $key] = array(
556 'label' => $val[
'label'],
557 'checked' => (($visible < 0) ? 0 : 1),
558 'enabled' => ($visible != 3 &&
dol_eval($val[
'enabled'], 1, 1,
'1')),
559 'position' => $val[
'position'],
560 'help' => isset($val[
'help']) ? $val[
'help'] :
''
565 $objectline->fields =
dol_sort_array($objectline->fields,
'position');
578 $title = $langs->transnoentitiesnoconv(
"Skilldets");
581 $nbtotalofrecords = 0;
586 $sql .= $objectline->getFieldList(
't');
587 $sql .=
" FROM " . MAIN_DB_PREFIX . $objectline->table_element .
" as t";
588 if ($objectline->ismultientitymanaged == 1) {
589 $sql .=
" WHERE t.entity IN (" .
getEntity($objectline->element) .
")";
591 $sql .=
" WHERE 1 = 1 ";
595 $sql .=
" AND fk_skill = " . ((int) $id) .
" ";
599 if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) {
600 $num = $nbtotalofrecords;
603 $sql .= $db->plimit($limit + 1, $offset);
606 $resql = $db->query(
$sql);
612 $num = $db->num_rows($resql);
615 print
'<form method="POST" id="searchFormList" action="' . $_SERVER[
"PHP_SELF"] .
'">' .
"\n";
616 if ($optioncss !=
'') {
617 print
'<input type="hidden" name="optioncss" value="' . $optioncss .
'">';
619 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
620 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
621 print
'<input type="hidden" name="action" value="list">';
622 print
'<input type="hidden" name="sortfield" value="' . $sortfield .
'">';
623 print
'<input type="hidden" name="sortorder" value="' . $sortorder .
'">';
624 print
'<input type="hidden" name="page" value="' . $page .
'">';
625 print
'<input type="hidden" name="contextpage" value="' . $contextpage .
'">';
627 print
'<input type="hidden" name="id" value="' . $id .
'">';
630 $param_fk =
"&fk_skill=" . $id .
"&fk_user_creat=" . (!empty($user->rowid) ? $user->rowid :0);
631 $backtopage =
dol_buildpath(
'/hrm/skill_card.php', 1) .
'?id=' . $id;
633 $massactionbutton =
"";
636 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_' . $object->picto, 0,
"",
'',
'', 0, 0, 1);
639 $topicmail =
"SendSkilldetRef";
640 $modelmail =
"skilldet";
642 $trackid =
'xxxx' . $object->id;
646 foreach ($fieldstosearchall as $key => $val) {
647 $fieldstosearchall[$key] = $langs->trans($val);
649 print
'<div class="divsearchfieldfilter">' . $langs->trans(
"FilterOnInto", $search_all) . join(
', ', $fieldstosearchall) .
'</div>';
657 $parameters = array();
658 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $objectline);
659 if (empty($reshook)) {
660 $moreforfilter .= $hookmanager->resPrint;
662 $moreforfilter = $hookmanager->resPrint;
665 if (!empty($moreforfilter)) {
666 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
667 print $moreforfilter;
671 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
675 print
'<div class="div-table-responsive">';
676 print
'<table class="tagtable nobottomiftotal liste' . ($moreforfilter ?
" listwithfilterbefore" :
"") .
'">' .
"\n";
681 print
'<tr class="liste_titre">';
682 foreach ($objectline->fields as $key => $val) {
693 if (!empty($arrayfields[
't.' . $key][
'checked'])) {
694 print
getTitleFieldOfList($arrayfields[
't.' . $key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.' . $key,
'', $param, (!empty($cssforfield) ?
'class="' . $cssforfield .
'"' :
''), $sortfield, $sortorder, (!empty($cssforfield) ? $cssforfield .
' ' :
'')) .
"\n";
699 print
'</tr>' .
"\n";
706 $totalarray = array();
707 $totalarray[
'nbfield'] = 0;
708 while ($i < ($limit ? min($num, $limit) : $num)) {
709 $obj = $db->fetch_object($resql);
714 if ($obj->rankorder > $MaxNumberSkill) {
719 $objectline->setVarsFromFetchObj($obj);
722 print
'<tr class="oddeven">';
723 foreach ($objectline->fields as $key => $val) {
742 if (!empty($arrayfields[
't.' . $key][
'checked'])) {
743 print
'<td' . ($cssforfield ?
' class="' . $cssforfield .
'"' :
'') .
'>';
744 if ($key ==
'status') {
745 print $objectline->getLibStatut(5);
746 } elseif ($key ==
'rowid') {
747 print $objectline->showOutputField($val, $key, $objectline->id,
'');
749 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>';
751 print $objectline->showOutputField($val, $key, $objectline->$key,
'');
757 $totalarray[
'nbfield']++;
759 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
761 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.' . $key;
763 if (!isset($totalarray[
'val'])) {
764 $totalarray[
'val'] = array();
766 if (!isset($totalarray[
'val'][
't.' . $key])) {
767 $totalarray[
'val'][
't.' . $key] = 0;
769 $totalarray[
'val'][
't.' . $key] += $objectline->$key;
791 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $objectline,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
792 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $objectline);
793 print $hookmanager->resPrint;
799 $totalarray[
'nbfield']++;
802 print
'</tr>' .
"\n";
812 foreach ($arrayfields as $key => $val) {
813 if (!empty($val[
'checked'])) {
817 print
'<tr><td colspan="' . $colspan .
'" class="opacitymedium">' . $langs->trans(
"NoRecordFound") .
'</td></tr>';
820 if (!empty($resql)) $db->free($resql);
822 $parameters = array(
'arrayfields' => $arrayfields,
'sql' =>
$sql);
823 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $objectline);
824 print $hookmanager->resPrint;
826 print
'</table>' .
"\n";
827 print
'</div>' .
"\n";
829 print
'</form>' .
"\n";
851 print
'<div class="fichecenter"><div class="fichehalfleft">';
854 $linktoelem =
$form->showLinkToObjectBlock($object,
null, array(
'skill'));
855 $somethingshown =
$form->showLinkedObjectBlock($object, $linktoelem);
857 print
'</div><div class="fichehalfright">';
861 $morehtmlcenter =
dolGetButtonTitle($langs->trans(
'SeeAll'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/hrm/skill_agenda.php?id='.$object->id);
864 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formactions.class.php';
866 $somethingshown =
$formactions->showactions($object, $object->element .
'@' . $object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1,
'', $MAXEVENT,
'', $morehtmlcenter);
868 print
'</div></div>';
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.
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(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
if(isModEnabled('facture') && $user->hasRight('facture', 'lire')) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') && $user->hasRight('don', 'lire')) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $sql
Social contributions to pay.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.
setEventMessage($mesgs, $style='mesgs', $noduplicate=0)
Set event message in dol_events session object.
dol_now($mode='auto')
Return date for now.
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...
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_eval($s, $returnvalue=0, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
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.
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.
verifCond($strToEvaluate)
Verify if condition in string is ok or not.
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.
$formconfirm
if ($action == 'delbookkeepingyear') {
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.