31require
'../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/evaluation.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/hrm/class/job.class.php';
38require_once DOL_DOCUMENT_ROOT.
'/hrm/class/skill.class.php';
39require_once DOL_DOCUMENT_ROOT.
'/hrm/class/skillrank.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/hrm/lib/hrm_evaluation.lib.php';
41require_once DOL_DOCUMENT_ROOT.
'/hrm/lib/hrm_skillrank.lib.php';
54$langs->loadLangs(array(
'hrm',
'other',
'products'));
59$action =
GETPOST(
'action',
'aZ09');
60$confirm =
GETPOST(
'confirm',
'alpha');
62$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'evaluationcard';
63$backtopage =
GETPOST(
'backtopage',
'alpha');
64$backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
70$diroutputmassaction =
$conf->hrm->dir_output.
'/temp/massgeneration/'.$user->id;
71$hookmanager->initHooks(array(
'evaluationcard',
'globalcard'));
74$extrafields->fetch_name_optionals_label(
$object->table_element);
76$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
79$search_all =
GETPOST(
"search_all",
'alpha');
81foreach (
$object->fields as $key => $val) {
82 if (
GETPOST(
'search_'.$key,
'alpha')) {
83 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
87if (empty($action) && empty($id) && empty($ref)) {
92include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
95$permissiontoread = $user->hasRight(
'hrm',
'evaluation',
'read');
96$permissiontoadd = $user->hasRight(
'hrm',
'evaluation',
'write');
97$permissiontovalidate = (
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS') && $user->hasRight(
'hrm',
'evaluation_advance',
'validate')) || (!
getDolGlobalString(
'MAIN_USE_ADVANCED_PERMS') && $permissiontoadd);
98$permissiontoclose = $user->hasRight(
'hrm',
'evaluation',
'write');
99$permissiontodelete = $user->hasRight(
'hrm',
'evaluation',
'delete');
100$permissiondellink = $user->hasRight(
'hrm',
'evaluation',
'write');
101$upload_dir =
$conf->hrm->multidir_output[isset(
$object->entity) ?
$object->entity : 1].
'/evaluation';
106$isdraft = (
$object->status == Evaluation::STATUS_DRAFT) ? 1 : 0;
108if (!isModEnabled(
"hrm")) {
111if (!$permissiontoread || ($action ===
'create' && !$permissiontoadd)) {
120$parameters = array();
121$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
126if (empty($reshook)) {
129 $backurlforlist =
dol_buildpath(
'/hrm/evaluation_list.php', 1);
131 if (empty($backtopage) || ($cancel && empty($id))) {
132 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
133 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
134 $backtopage = $backurlforlist;
136 $backtopage =
dol_buildpath(
'/hrm/evaluation_card.php', 1).
'?id='.(
$id > 0 ?
$id :
'__ID__');
141 $triggermodname =
'HRM_EVALUATION_MODIFY';
144 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
147 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
150 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
156 if ($action ==
'set_thirdparty' && $permissiontoadd) {
157 $object->setValueFrom(
'fk_soc',
GETPOSTINT(
'fk_soc'),
'',
null,
'date',
'', $user, $triggermodname);
159 if ($action ==
'classin' && $permissiontoadd) {
164 $triggersendname =
'HRM_EVALUATION_SENTBYMAIL';
165 $autocopy =
'MAIN_MAIL_AUTOCOPY_EVALUATION_TO';
166 $trackid =
'evaluation'.$object->id;
167 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
169 if ($action ==
'saveSkill' && $permissiontoadd) {
170 $TNote =
GETPOST(
'TNote',
'array');
171 if (!empty($TNote)) {
172 foreach (
$object->lines as $line) {
173 $line->rankorder = ($TNote[$line->fk_skill] ==
"NA" ? -1 : $TNote[$line->fk_skill]);
174 $line->update($user);
180 if ($action ==
'close' && $permissiontoadd) {
183 $SkillrecordsForActiveUser = $sk->fetchAll(
'ASC',
'fk_skill', 0, 0,
"(fk_object:=:".((
int)
$object->fk_user).
") AND (objecttype:=:'".$db->escape(SkillRank::SKILLRANK_TYPE_USER).
"')",
'AND');
184 '@phan-var-force SkillRank[] $SkillrecordsForActiveUser';
188 foreach (
$object->lines as $key => $line) {
190 if (count($SkillrecordsForActiveUser) == 0) {
192 $resCreate = $newSkill->cloneFromCurrentSkill($line,
$object->fk_user);
194 if ($resCreate <= 0) {
196 setEventMessage($langs->trans(
'ErrorCreateUserSkill', $line->fk_skill));
202 foreach ($SkillrecordsForActiveUser as $k => $sr) {
203 if ($sr->fk_skill == $line->fk_skill) {
211 $updSkill = $SkillrecordsForActiveUser[$k];
213 $updSkill->rankorder = $line->rankorder;
214 $updSkill->update($user);
217 $resCreate = $newSkill->cloneFromCurrentSkill($line,
$object->fk_user);
221 if (empty($errors)) {
222 $object->setStatut(Evaluation::STATUS_CLOSED);
227 if ($action ==
'reopen' && $permissiontoadd) {
229 $object->setStatut(Evaluation::STATUS_VALIDATED);
233 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
236 if ($action ==
'remove_file_comfirm' && $permissiontoadd) {
238 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
240 $upload_dir =
$conf->hrm->dir_output;
241 $file = $upload_dir.
'/'.
GETPOST(
'file');
260$form =
new Form($db);
264$title = $langs->trans(
"Evaluation");
267$css[] =
'/hrm/css/style.css';
268llxHeader(
'', $title, $help_url,
'', 0, 0,
'', $css);
270print
'<script type="text/javascript" language="javascript">
271 $(document).ready(function() {
272 $("#btn_valid").click(function(){
273 var form = $("#form_save_rank");
278 url: form.attr("action"),
279 data: form.serialize(),
281 }).always(function() {
282 window.location.href = "'.dol_buildpath(
'/hrm/evaluation_card.php', 1).
'?id='.
$id.
'&action=validate&token='.
newToken().
'";
291if ($action ==
'create') {
294 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
295 print
'<input type="hidden" name="token" value="'.newToken().
'">';
296 print
'<input type="hidden" name="action" value="add">';
298 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
300 if ($backtopageforcancel) {
301 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
306 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
309 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
312 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
314 print
'</table>'.
"\n";
318 print $form->buttonsSaveCancel(
"Create",
"Cancel");
324if (($id || $ref) && $action ==
'edit') {
325 print
load_fiche_titre($langs->trans(
"Evaluation"),
'',
'object_'.$object->picto);
327 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
328 print
'<input type="hidden" name="token" value="'.newToken().
'">';
329 print
'<input type="hidden" name="action" value="update">';
330 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
332 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
334 if ($backtopageforcancel) {
335 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
340 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
343 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
346 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
352 print $form->buttonsSaveCancel();
358if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
359 $res =
$object->fetch_optionals();
366 if ($action ==
'validate' && $permissiontovalidate) {
371 $ref = substr(
$object->ref, 1, 4);
372 if ($ref ==
'PROV') {
373 $numref =
$object->getNextNumRef();
374 if (empty($numref)) {
382 $text = $langs->trans(
'ConfirmValidateEvaluation', $numref);
383 if (isModEnabled(
'notification')) {
384 require_once DOL_DOCUMENT_ROOT.
'/core/class/notify.class.php';
385 $notify =
new Notify($db);
387 $text .= $notify->confirmMessage(
'HRM_EVALUATION_VALIDATE', 0, $object);
391 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ValidateEvaluation'), $text,
'confirm_validate',
'', 0, 1);
396 if ($action ==
'delete') {
397 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'DeleteEvaluation'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
400 if ($action ==
'deleteline') {
401 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
404 if ($action ==
'clone') {
406 $formquestion = array();
407 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1);
411 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
412 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
413 if (empty($reshook)) {
414 $formconfirm .= $hookmanager->resPrint;
415 } elseif ($reshook > 0) {
416 $formconfirm = $hookmanager->resPrint;
425 $linkback =
'<a href="'.dol_buildpath(
'/hrm/evaluation_list.php', 1).
'?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
427 $morehtmlref =
'<div class="refidno">';
428 $morehtmlref .= $langs->trans(
'Label').
' : '.
$object->label;
429 $u_position =
new User(($db));
430 $u_position->fetch(
$object->fk_user);
431 $morehtmlref .=
'<br>'.$u_position->getNomUrl(1);
434 $morehtmlref .=
'<br>'.$langs->trans(
'JobProfile').
' : '.$job->getNomUrl(1);
435 $morehtmlref .=
'</div>';
439 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
442 print
'<div class="fichecenter">';
443 print
'<div class="fichehalfleft">';
444 print
'<div class="underbanner clearboth"></div>';
445 print
'<table class="border centpercent tableforfield">'.
"\n";
447 $object->fields[
'label'][
'visible'] = 0;
448 $object->fields[
'fk_user'][
'visible'] = 0;
449 $object->fields[
'fk_job'][
'visible'] = 0;
450 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
453 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
459 print
'<div class="clearboth"></div>';
466 if (!empty(
$object->table_element_line) &&
$object->status == Evaluation::STATUS_DRAFT) {
468 $result =
$object->getLinesArray();
475 print
' <form name="form_save_rank" id="form_save_rank" action="'.$_SERVER[
"PHP_SELF"].
'?id='.
$object->id.(($action !=
'editline') ?
'' :
'#line_'.
GETPOSTINT(
'lineid')).
'" method="POST">
476 <input type="hidden" name="token" value="' .
newToken().
'">
477 <input type="hidden" name="action" value="saveSkill">
478 <input type="hidden" name="mode" value="">
479 <input type="hidden" name="page_y" value="">
480 <input type="hidden" name="id" value="' .
$object->id.
'">
483 if (!empty(
$conf->use_javascript_ajax) &&
$object->status == 0) {
484 include DOL_DOCUMENT_ROOT.
'/core/tpl/ajaxrow.tpl.php';
487 $conf->modules_parts[
'tpl'][
'hrm'] =
'/hrm/core/tpl/';
489 print
'<div class="div-table-responsive-no-min">';
490 if (!empty(
$object->lines) || (
$object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
491 print
'<table id="tablelines" class="noborder noshadow centpercent">';
499 print
'<tr><td colspan="4"><span class="opacitymedium">'.img_warning().
' '.$langs->trans(
"TheJobProfileHasNoSkillsDefinedFixBefore").
'</td></tr>';
517 if (!empty(
$object->lines) || (
$object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
529 if (
$object->status != Evaluation::STATUS_DRAFT) {
534 $sql .=
' e.date_creation,';
535 $sql .=
' e.fk_job,';
536 $sql .=
' j.label as "refjob",';
537 $sql .=
' ed.fk_skill,';
539 $sql .=
' sk.label as "skilllabel",';
540 $sql .=
' sk.skill_type,';
541 $sql .=
' sk.description,';
542 $sql .=
' ed.rankorder,';
543 $sql .=
' ed.required_rank,';
544 $sql .=
' ed.rankorder as "userRankForSkill",';
545 $sql .=
' skdet_user.description as "userRankForSkillDesc",';
546 $sql .=
' skdet_required.description as "required_rank_desc"';
548 $sql .=
' FROM ' . MAIN_DB_PREFIX .
'hrm_evaluation as e';
549 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'hrm_evaluationdet as ed ON e.rowid = ed.fk_evaluation';
550 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'hrm_job as j ON e.fk_job = j.rowid';
551 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'hrm_skill as sk ON ed.fk_skill = sk.rowid';
552 $sql .=
' INNER JOIN ' . MAIN_DB_PREFIX .
'hrm_skilldet as skdet_user ON (skdet_user.fk_skill = sk.rowid AND skdet_user.rankorder = ed.rankorder)';
554 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'hrm_skilldet as skdet_required ON (skdet_required.fk_skill = sk.rowid AND skdet_required.rankorder = ed.required_rank)';
555 $sql .=
" WHERE e.rowid =" . ((int)
$object->id);
559 $resql = $db->query($sql);
564 while ($obj = $db->fetch_object($resql)) {
567 $Tab[$num]->skill_type = $obj->skill_type;
568 $Tab[$num]->skill_id = $obj->fk_skill;
569 $Tab[$num]->skilllabel = $obj->skilllabel;
570 $Tab[$num]->description = $obj->description;
571 $Tab[$num]->userRankForSkill =
'<span title="'.$obj->userRankForSkillDesc.
'" class="radio_js_bloc_number TNote_1">' . $obj->userRankForSkill .
'</span>';
573 $required_rank = $obj->required_rank;
574 $required_rank_desc = $obj->required_rank_desc;
575 if ($required_rank ==
"-1") {
576 $required_rank = $langs->trans(
"NA");
577 $required_rank_desc = $langs->trans(
"NA");
578 } elseif ($required_rank ==
"0") {
579 $required_rank_desc = $langs->trans(
'SkillNotRequired');
582 $Tab[$num]->required_rank =
'<span title="'.$required_rank_desc.
'" class="radio_js_bloc_number TNote_1">' . $required_rank .
'</span>';
584 if ($obj->userRankForSkill < 0 || $obj->required_rank < 0) {
585 $title = $langs->trans(
'NA');
587 } elseif ($obj->userRankForSkill > $obj->required_rank) {
588 $title = $langs->trans(
'MaxlevelGreaterThanShort');
589 $class .=
'veryhappy';
590 } elseif ($obj->userRankForSkill == $obj->required_rank) {
591 $title = $langs->trans(
'MaxLevelEqualToShort');
593 } elseif ($obj->userRankForSkill < $obj->required_rank) {
594 $title = $langs->trans(
'MaxLevelLowerThanShort');
598 $Tab[$num]->result =
'<span title="'.$title.
'" class="classfortooltip ' . $class .
' note"> </span>';
605 print
'<div class="div-table-responsive-no-min">';
606 print
'<table id="tablelines" class="noborder noshadow centpercent">';
608 print
'<tr class="liste_titre">';
609 print
'<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans(
"TypeSkill") .
' </th>';
610 print
'<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans(
"Label") .
'</th>';
611 print
'<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans(
"Description") .
'</th>';
612 print
'<th style="width:auto;text-align:center" class="liste_titre">' . $langs->trans(
"EmployeeRank") .
'</th>';
613 print
'<th style="width:auto;text-align:center" class="liste_titre">' . $langs->trans(
"RequiredRank") .
'</th>';
614 print
'<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans(
"Result") .
' ' .$form->textwithpicto(
'',
GetLegendSkills(), 1) .
'</th>';
617 $sk =
new Skill($db);
618 foreach ($Tab as $t) {
619 $sk->fetch($t->skill_id);
623 print
' <td class="tdoverflowmax200">' . $sk->getNomUrl(1) .
'</td>';
624 print
' <td class="tdoverflowmax200" title="'.dolPrintHTMLForAttribute($t->description).
'">' .
dolPrintHTML($t->description) .
'</td>';
625 print
' <td class="center">' . $t->userRankForSkill .
'</td>';
626 print
' <td class="center">' . $t->required_rank .
'</td>';
627 print
' <td>' . $t->result .
'</td>';
636 $(document).ready(
function() {
637 $(
".radio_js_bloc_number").tooltip();
647 if ($action !=
'presend' && $action !=
'editline') {
648 print
'<div class="tabsAction">'.
"\n";
649 $parameters = array();
650 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
655 if (empty($reshook)) {
657 if (empty($user->socid)) {
658 print
dolGetButtonAction(
'', $langs->trans(
'SendMail'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=presend&mode=init&token='.
newToken().
'#formmailbeforetitle');
662 if (
$object->status == $object::STATUS_VALIDATED) {
663 print
dolGetButtonAction(
'', $langs->trans(
'SetToDraft'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=confirm_setdraft&confirm=yes&token='.
newToken(),
'', $permissiontoadd);
664 print
dolGetButtonAction(
'', $langs->trans(
'Close'),
'close', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=close&token='.
newToken(),
'', $permissiontodelete || (
$object->status == $object::STATUS_CLOSED && $permissiontoclose));
665 } elseif (
$object->status != $object::STATUS_CLOSED) {
666 print
dolGetButtonAction(
'', $langs->trans(
'Modify'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=edit&token='.
newToken(),
'', $permissiontoadd);
669 if (
$object->status == $object::STATUS_CLOSED) {
670 print
dolGetButtonAction($langs->trans(
'ReOpen'),
'',
'default', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=reopen&token='.
newToken(),
'', $permissiontoadd);
675 if (
$object->status == $object::STATUS_DRAFT) {
677 print
dolGetButtonAction($langs->trans(
'Save').
' '.$langs->trans(
'and').
' '.$langs->trans(
'Valid'),
'',
'default',
'#',
'btn_valid', $permissiontovalidate);
679 $langs->load(
"errors");
680 print
dolGetButtonAction($langs->trans(
"ErrorAddAtLeastOneLineFirst"), $langs->trans(
"Validate"),
'default',
'#',
'', 0);
686 print
dolGetButtonAction($langs->trans(
'Delete'),
'',
'delete', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=delete&token='.
newToken(),
'', $permissiontodelete);
694 if (
GETPOST(
'modelselected')) {
698 if ($action !=
'presend') {
699 print
'<div class="fichecenter"><div class="fichehalfleft">';
700 print
'<a name="builddoc"></a>';
702 $includedocgeneration = 1;
705 if ($user->hasRight(
'hrm',
'evaluation',
'read')) {
707 $relativepath = $objref.
'/'.$objref.
'.pdf';
708 $filedir =
$conf->hrm->dir_output.
'/'.
$object->element.
'/'.$objref;
709 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
710 $genallowed = $user->hasRight(
'hrm',
'evaluation',
'read');
711 $delallowed = $user->hasRight(
'hrm',
'evaluation',
'write');
712 print $formfile->showdocuments(
'hrm:Evaluation',
$object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed,
$object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang,
'', $object, 0,
'remove_file_comfirm');
716 $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'evaluation'), 1);
717 $linktoelem = $tmparray[
'linktoelem'];
718 $htmltoenteralink = $tmparray[
'htmltoenteralink'];
719 print $htmltoenteralink;
721 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
724 print
'</div><div class="fichehalfright">';
728 $morehtmlcenter =
dolGetButtonTitle($langs->trans(
'SeeAll'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/hrm/evaluation_agenda.php?id='.
$object->id);
731 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
733 $somethingshown = $formactions->showactions($object,
$object->element.
'@'.
$object->module, (is_object(
$object->thirdparty) ?
$object->thirdparty->id : 0), 1,
'', $MAXEVENT,
'', $morehtmlcenter);
735 print
'</div></div>';
744 $modelmail =
'evaluation';
745 $defaulttopic =
'InformationMessage';
746 $diroutput =
$conf->hrm->dir_output;
747 $trackid =
'evaluation'.$object->id;
749 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
$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.
Class to manage the table of subscription to notifications.
static typeCodeToLabel($code)
Class to manage Dolibarr users.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
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.
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.
dolPrintHTML($s, $allowiframe=0)
Return a string (that can be on several lines) ready to be output on a HTML page.
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, $attop=0)
Set event message in dol_events session object.
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.
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.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0)
Clean a string to use it as a file name.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
evaluationPrepareHead($object)
Prepare array of tabs for Evaluation.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.