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();
118$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
123if (empty($reshook)) {
126 $backurlforlist = DOL_URL_ROOT.
'/hrm/skill_list.php';
128 if (empty($backtopage) || ($cancel && empty($id))) {
129 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
130 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
131 $backtopage = $backurlforlist;
133 $backtopage = DOL_URL_ROOT.
'/hrm/skill_card.php?id=' . (
$id > 0 ?
$id :
'__ID__');
138 $triggermodname =
'HRM_SKILL_MODIFY';
141 $skilldetArray =
GETPOST(
"descriptionline",
"array:alphanohtml");
144 if (is_array($skilldetArray) && count($skilldetArray) > 0) {
145 if ($action ==
'update' && $permissiontoadd) {
146 foreach ($skilldetArray as $key => $SkValueToUpdate) {
148 $res = $skilldetObj->fetch($key);
150 $skilldetObj->description = $SkValueToUpdate;
151 $resupd = $skilldetObj->update($user);
164 if (in_array($action, array(
"confirm_delete",
"update"))) {
168 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
171 if (is_array($skilldetArray) && count($skilldetArray) > 0) {
172 if ($action ==
'add' && $permissiontoadd) {
173 $arraySkill =
$object->fetchLines();
174 '@phan-var-force Skilldet[] $arraySkill';
177 foreach ($arraySkill as $skilldet) {
178 if ($skilldet->rankorder != 0) {
179 if (isset($skilldetArray[$index])) {
180 $SkValueToUpdate = $skilldetArray[$index];
181 $skilldet->description = !empty($SkValueToUpdate) ? $SkValueToUpdate : $skilldet->description;
182 $resupd = $skilldet->update($user);
190 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?id=".
$object->id);
198 include DOL_DOCUMENT_ROOT .
'/core/actions_dellink.inc.php';
201 include DOL_DOCUMENT_ROOT .
'/core/actions_printing.inc.php';
207 include DOL_DOCUMENT_ROOT .
'/core/actions_builddoc.inc.php';
210 '@phan-var-force int $result';
212 if ($action ==
'set_thirdparty' && $permissiontoadd) {
213 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
215 if ($action ==
'classin' && $permissiontoadd) {
220 $triggersendname =
'HRM_SKILL_SENTBYMAIL';
221 $autocopy =
'MAIN_MAIL_AUTOCOPY_SKILL_TO';
222 $trackid =
'skill' .
$object->id;
223 include DOL_DOCUMENT_ROOT .
'/core/actions_sendmails.inc.php';
225 if ($action ==
'confirm_clone' && $confirm !=
'yes') {
229 if ($action ==
'confirm_clone' && $confirm ==
'yes' && $permissiontoadd) {
231 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?id=".$id);
245$title = $langs->trans(
"Skill");
251if ($action ==
'create') {
254 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
255 print
'<input type="hidden" name="token" value="' . newToken() .
'">';
256 print
'<input type="hidden" name="action" value="add">';
257 $backtopage .= (strpos($backtopage,
'?') > 0 ?
'&' :
'?') .
"objecttype=job";
259 print
'<input type="hidden" name="backtopage" value="' . $backtopage .
'">';
261 if ($backtopageforcancel) {
262 print
'<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel .
'">';
267 print
'<table class="border centpercent tableforfieldcreate">' .
"\n";
270 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_add.tpl.php';
273 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
280 print
'</table>' .
"\n";
283 print
'<table class="border centpercent =">' .
"\n";
284 for ($i = 1; $i <= $MaxNumberSkill; $i++) {
285 print
'<tr><td class="titlefieldcreate tdtop">'. $langs->trans(
'Description') .
' ' . $langs->trans(
'rank') .
' ' . $i .
'</td>';
286 print
'<td class="valuefieldcreate"><textarea name="descriptionline[]" rows="5" class="flat minwidth100" style="margin-top: 5px; width: 90%"></textarea></td>';
292 print
'<div class="center">';
293 print
'<input type="submit" class="button" name="add" value="' .
dol_escape_htmltag($langs->trans(
"Create")) .
'">';
295 print
'<input type="' . ($backtopage ?
"submit" :
"button") .
'" class="button button-cancel" name="cancel" value="' .
dol_escape_htmltag($langs->trans(
"Cancel")) .
'"' . ($backtopage ?
'' :
' onclick="history.go(-1)"') .
'>';
305if (($id || $ref) && $action ==
'edit') {
308 print
'<form method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
309 print
'<input type="hidden" name="token" value="' . newToken() .
'">';
310 print
'<input type="hidden" name="action" value="update">';
311 print
'<input type="hidden" name="id" value="' .
$object->id .
'">';
313 print
'<input type="hidden" name="backtopage" value="' . $backtopage .
'">';
315 if ($backtopageforcancel) {
316 print
'<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel .
'">';
321 print
'<table class="border centpercent tableforfieldedit">' .
"\n";
324 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_edit.tpl.php';
327 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
334 $SkilldetRecords =
$object->fetchLines();
335 '@phan-var-force Skilldet[] $SkilldetRecords';
337 if (is_array($SkilldetRecords) && count($SkilldetRecords) == 0) {
341 if (is_array($SkilldetRecords) && count($SkilldetRecords) > 0) {
343 foreach ($SkilldetRecords as $sk) {
344 if ($sk->rankorder > $MaxNumberSkill) {
348 print
'<table class="border centpercent =">' .
"\n";
350 foreach ($sk->fields as $key => $val) {
351 if (abs($val[
'visible']) != 1 && abs($val[
'visible']) != 3 && abs($val[
'visible']) != 4) {
355 if (array_key_exists(
'enabled', $val) && isset($val[
'enabled']) && !
verifCond($val[
'enabled'])) {
359 print
'<tr class="field_' . $key .
'"><td';
360 print
' class="titlefieldcreate';
361 if (isset($val[
'notnull']) && $val[
'notnull'] > 0) {
362 print
' fieldrequired';
364 if (preg_match(
'/^(text|html)/', $val[
'type'])) {
371 print $langs->trans($val[
'label']).
' '.$langs->trans(
'rank').
' '.$sk->rankorder;
374 print
'<td class="valuefieldcreate">';
389 $check =
'restricthtml';
391 $skilldetArray =
GETPOST(
"descriptionline",
"array");
392 if (empty($skilldetArray)) {
393 $value = GETPOSTISSET($key) ?
GETPOST($key, $check) : $sk->$key;
395 $value = $skilldetArray[$sk->id];
404 if (!empty($val[
'noteditable'])) {
405 print $sk->showOutputField($val, $key, $value,
'',
'',
'', 0);
408 print $sk->showInputField($val, $key, $value,
"",
"line[" . $sk->id .
"]",
"",
"");
420 print
'<div class="center"><input type="submit" class="button button-save" name="save" value="' . $langs->trans(
"Save") .
'">';
421 print
' <input type="submit" class="button button-cancel" name="cancel" value="' . $langs->trans(
"Cancel") .
'">';
429if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
430 $res =
$object->fetch_optionals();
438 if ($action ==
'delete') {
439 $formconfirm = $form->formconfirm(
dolBuildUrl($_SERVER[
"PHP_SELF"], [
'id' =>
$object->id]), $langs->trans(
'DeleteSkill'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
442 if ($action ==
'deleteline') {
443 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&lineid=' . $lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
446 if ($action ===
'clone') {
447 $formquestion = array(
448 array(
'type' =>
'text',
'name' =>
'clone_label',
'label' => $langs->trans(
"Label"),
'value' => $langs->trans(
"CopyOf").
' '.
$object->label),
450 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->label),
'confirm_clone', $formquestion,
'yes', 1, 280);
454 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
455 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
456 if (empty($reshook)) {
457 $formconfirm .= $hookmanager->resPrint;
458 } elseif ($reshook > 0) {
459 $formconfirm = $hookmanager->resPrint;
468 $linkback =
'<a href="' . DOL_URL_ROOT.
'/hrm/skill_list.php?restore_lastsearch_values=1' . (!empty($socid) ?
'&socid=' . $socid :
'') .
'">' . $langs->trans(
"BackToList") .
'</a>';
471 $morehtmlref =
'<div class="refid">';
472 $morehtmlref .=
$object->label;
473 $morehtmlref .=
'</div>';
474 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'rowid', $morehtmlref);
477 print
'<div class="fichecenter">';
478 print
'<div class="fichehalfleft">';
479 print
'<div class="underbanner clearboth"></div>';
480 print
'<table class="border centpercent tableforfield">' .
"\n";
482 $object->fields[
'label'][
'visible'] = 0;
483 include DOL_DOCUMENT_ROOT .
'/core/tpl/commonfields_view.tpl.php';
486 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
493 print
'<div class="clearboth"></div>';
502 if ($action !=
'presend' && $action !=
'editline') {
503 print
'<div class="tabsAction">' .
"\n";
504 $parameters = array();
505 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
510 if (empty($reshook)) {
512 if (
$object->status == $object::STATUS_VALIDATED) {
513 print dolGetButtonAction($langs->trans(
'SetToDraft'),
'',
'default', $_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&action=confirm_setdraft&confirm=yes&token=' . newToken(),
'', $permissiontoadd);
516 print dolGetButtonAction($langs->trans(
'Modify'),
'',
'default', $_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&action=edit&token=' . newToken(),
'', $permissiontoadd);
519 if ($permissiontoadd) {
520 print dolGetButtonAction(
'', $langs->trans(
'ToClone'),
'clone', $_SERVER[
"PHP_SELF"].
'?action=clone&token='.newToken().
'&id='.
$object->id,
'');
523 print dolGetButtonAction($langs->trans(
'Delete'),
'',
'delete', $_SERVER[
'PHP_SELF'] .
'?id=' .
$object->id .
'&action=delete&token=' . newToken(),
'', $permissiontodelete);
525 print
'</div>' .
"\n";
532if ($action !=
"create" && $action !=
"edit") {
533 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formcompany.class.php';
534 require_once DOL_DOCUMENT_ROOT .
'/core/lib/date.lib.php';
535 require_once DOL_DOCUMENT_ROOT .
'/core/lib/company.lib.php';
538 require_once __DIR__ .
'/class/skilldet.class.php';
543 $action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
544 $massaction =
GETPOST(
'massaction',
'alpha');
546 $confirm =
GETPOST(
'confirm',
'alpha');
547 $cancel =
GETPOST(
'cancel',
'alpha');
548 $toselect =
GETPOST(
'toselect',
'array:int');
549 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'skilldetlist';
550 $backtopage =
GETPOST(
'backtopage',
'alpha');
551 $optioncss =
GETPOST(
'optioncss',
'aZ');
557 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
558 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
560 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
564 $offset = $limit * $page;
565 $pageprev = $page - 1;
566 $pagenext = $page + 1;
575 reset($objectline->fields);
576 $sortfield =
"t." . key($objectline->fields);
583 $search_all =
GETPOST(
'search_all',
'alphanohtml');
585 foreach ($objectline->fields as $key => $val) {
586 if (
GETPOST(
'search_' . $key,
'alpha') !==
'') {
587 $search[$key] =
GETPOST(
'search_' . $key,
'alpha');
589 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
596 $fieldstosearchall = array();
597 foreach ($objectline->fields as $key => $val) {
598 if (!empty($val[
'searchall'])) {
599 $fieldstosearchall[
't.' . $key] = $val[
'label'];
604 $arrayfields = array();
605 foreach ($objectline->fields as $key => $val) {
607 if (!empty($val[
'visible'])) {
608 $visible = (int)
dol_eval((
string) $val[
'visible'], 1, 1,
'1');
609 $arrayfields[
't.' . $key] = array(
610 'label' => $val[
'label'],
611 'checked' => (($visible < 0) ? 0 : 1),
612 'enabled' => (abs($visible) != 3 && (bool)
dol_eval((
string) $val[
'enabled'], 1)),
613 'position' => $val[
'position'],
614 'help' => isset($val[
'help']) ? $val[
'help'] :
''
619 $objectline->fields =
dol_sort_array($objectline->fields,
'position');
630 $title = $langs->transnoentitiesnoconv(
"Skilldets");
633 $nbtotalofrecords =
'';
638 $sql .= $objectline->getFieldList(
't');
639 $sql .=
" FROM " . MAIN_DB_PREFIX . $objectline->table_element .
" as t";
640 if ($objectline->ismultientitymanaged == 1) {
641 $sql .=
" WHERE t.entity IN (" .
getEntity($objectline->element) .
")";
643 $sql .=
" WHERE 1 = 1 ";
645 $sql .=
" AND fk_skill = ".((int) $id);
646 $sql .=
" AND rankorder <> 0";
648 $resql =
$db->query($sql);
649 $nbtotalofrecords =
$db->num_rows($resql);
650 $num =
$db->num_rows($resql);
652 print
'<form method="POST" id="searchFormList" action="' . $_SERVER[
"PHP_SELF"] .
'">' .
"\n";
653 if ($optioncss !=
'') {
654 print
'<input type="hidden" name="optioncss" value="' . $optioncss .
'">';
656 print
'<input type="hidden" name="token" value="' . newToken() .
'">';
657 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
658 print
'<input type="hidden" name="action" value="list">';
659 print
'<input type="hidden" name="sortfield" value="' . $sortfield .
'">';
660 print
'<input type="hidden" name="sortorder" value="' . $sortorder .
'">';
661 print
'<input type="hidden" name="page" value="' . $page .
'">';
662 print
'<input type="hidden" name="contextpage" value="' . $contextpage .
'">';
664 print
'<input type="hidden" name="id" value="' .
$id .
'">';
667 $param_fk =
"&fk_skill=" .
$id .
"&fk_user_creat=" . (!empty($user->rowid) ? $user->rowid : 0);
670 $massactionbutton =
"";
673 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_' .
$object->picto, 0,
'',
'', 0, 0, 0, 1);
676 $topicmail =
"SendSkilldetRef";
677 $modelmail =
"skilldet";
679 $trackid =
'xxxx' .
$object->id;
683 foreach ($fieldstosearchall as $key => $val) {
684 $fieldstosearchall[$key] = $langs->trans($val);
686 print
'<div class="divsearchfieldfilter">' . $langs->trans(
"FilterOnInto", $search_all) . implode(
', ', $fieldstosearchall) .
'</div>';
694 $parameters = array();
695 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $objectline);
696 if (empty($reshook)) {
697 $moreforfilter .= $hookmanager->resPrint;
699 $moreforfilter = $hookmanager->resPrint;
702 if (!empty($moreforfilter)) {
703 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
704 print $moreforfilter;
708 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
712 print
'<div class="div-table-responsive">';
713 print
'<table class="tagtable nobottomiftotal liste' . ($moreforfilter ?
" listwithfilterbefore" :
"") .
'">' .
"\n";
718 print
'<tr class="liste_titre">';
719 foreach ($objectline->fields as $key => $val) {
730 if (!empty($arrayfields[
't.' . $key][
'checked'])) {
731 print
getTitleFieldOfList($arrayfields[
't.' . $key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.' . $key,
'', $param, (!empty($cssforfield) ?
'class="' . $cssforfield .
'"' :
''), $sortfield, $sortorder, (!empty($cssforfield) ? $cssforfield .
' ' :
'')) .
"\n";
736 print
'</tr>' .
"\n";
745 while ($i < ($limit ? min($num, $limit) : $num)) {
746 $obj =
$db->fetch_object($resql);
751 if ($obj->rankorder > $MaxNumberSkill) {
756 $objectline->setVarsFromFetchObj($obj);
759 print
'<tr class="oddeven">';
760 foreach ($objectline->fields as $key => $val) {
779 if (!empty($arrayfields[
't.' . $key][
'checked'])) {
780 print
'<td' . (empty($cssforfield) ?
'' :
' class="' . $cssforfield .
'"') .
'>';
781 if ($key ==
'status') {
782 print $objectline->getLibStatut(5);
783 } elseif ($key ==
'rowid') {
784 print $objectline->showOutputField($val, $key, (
string) $objectline->id,
'');
786 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>';
788 print $objectline->showOutputField($val, $key, $objectline->$key,
'');
796 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
806 $totalarray[
'val'][
't.' . $key] += $objectline->$key;
828 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $objectline,
'obj' => $obj,
'i' => $i,
'totalarray' => &
$totalarray);
829 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $objectline);
830 print $hookmanager->resPrint;
839 print
'</tr>' .
"\n";
849 foreach ($arrayfields as $key => $val) {
850 if (!empty($val[
'checked'])) {
854 print
'<tr><td colspan="' . $colspan .
'"><span class="opacitymedium">' . $langs->trans(
"NoRecordFound") .
'</span></td></tr>';
857 if (!empty($resql)) {
861 $parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
862 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $objectline);
863 print $hookmanager->resPrint;
865 print
'</table>' .
"\n";
866 print
'</div>' .
"\n";
868 print
'</form>' .
"\n";
890 print
'<div class="fichecenter"><div class="fichehalfleft">';
893 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'skill'), 1);
894 $linktoelem = $tmparray[
'linktoelem'];
895 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
896 print $htmltoenteralink;
898 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
900 print
'</div><div class="fichehalfright">';
904 $morehtmlcenter = dolGetButtonTitle($langs->trans(
'SeeAll'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/hrm/skill_agenda.php?id='.
$object->id);
907 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formactions.class.php';
909 $somethingshown = $formactions->showactions($object,
$object->element .
'@' .
$object->module, (is_object(
$object->thirdparty) ?
$object->thirdparty->id : 0), 1,
'', $MAXEVENT,
'', $morehtmlcenter);
911 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.
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...
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.
dolBuildUrl($url, $params=[], $addtoken=false, $anchor='')
Return path of url.
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.
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...
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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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.
print $langs trans("Show") . '< td style="' . $timeColor . '" align="center"> s</td > badge status0 badge status4 badge status3 Error badge status8< td align="center">< span class="badge ' . $badge . '"></span ></td >< td align="center">< a href="#" class="button button-small" onclick="openLogModal(this)" data-req="' . dol_escape_htmltag($reqSafe) . '" data-res="' . dol_escape_htmltag($resSafe) . '" data-err="' . dol_escape_htmltag($errSafe) . '">< span class="fa fa-search-plus"></span ></a ></td ></tr >< tr >< td colspan="' . $colspan . '" class="opacitymedium"></td ></tr ></table ></div ></form > logModal none logModal none s a JSON string
buildzip.php
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.