30 require
'../main.inc.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
37 require_once __DIR__.
'/class/evaluation.class.php';
43 $langs->loadLangs(array(
'hrm',
'other'));
46 $action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
47 $massaction =
GETPOST(
'massaction',
'alpha');
48 $show_files =
GETPOST(
'show_files',
'int');
49 $confirm =
GETPOST(
'confirm',
'alpha');
50 $cancel =
GETPOST(
'cancel',
'alpha');
51 $toselect =
GETPOST(
'toselect',
'array');
52 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'evaluationlist';
53 $backtopage =
GETPOST(
'backtopage',
'alpha');
54 $optioncss =
GETPOST(
'optioncss',
'aZ');
60 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
61 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
62 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
64 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
68 $offset = $limit * $page;
69 $pageprev = $page - 1;
70 $pagenext = $page + 1;
75 $diroutputmassaction = $conf->hrm->dir_output.
'/temp/massgeneration/'.$user->id;
76 $hookmanager->initHooks(array(
'evaluationlist'));
79 $extrafields->fetch_name_optionals_label($object->table_element);
82 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
86 reset($object->fields);
87 $sortfield =
"t.".key($object->fields);
94 $search_all =
GETPOST(
'search_all',
'alphanohtml') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml');
96 foreach ($object->fields as $key => $val) {
97 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
98 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
100 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
101 $search[$key.
'_dtstart'] =
dol_mktime(0, 0, 0,
GETPOST(
'search_'.$key.
'_dtstartmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtstartday',
'int'),
GETPOST(
'search_'.$key.
'_dtstartyear',
'int'));
102 $search[$key.
'_dtend'] =
dol_mktime(23, 59, 59,
GETPOST(
'search_'.$key.
'_dtendmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtendday',
'int'),
GETPOST(
'search_'.$key.
'_dtendyear',
'int'));
107 $fieldstosearchall = array();
108 foreach ($object->fields as $key => $val) {
109 if (!empty($val[
'searchall'])) {
110 $fieldstosearchall[
't.'.$key] = $val[
'label'];
115 $arrayfields = array();
116 foreach ($object->fields as $key => $val) {
118 if (!empty($val[
'visible'])) {
119 $visible = (int)
dol_eval($val[
'visible'], 1, 1,
'1');
120 $arrayfields[
't.'.$key] = array(
121 'label'=>$val[
'label'],
122 'checked'=>(($visible < 0) ? 0 : 1),
123 'enabled'=>($visible != 3 &&
dol_eval($val[
'enabled'], 1, 1,
'1')),
124 'position'=>$val[
'position'],
125 'help'=> isset($val[
'help']) ? $val[
'help'] :
''
130 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
136 $permissiontoread = $user->rights->hrm->evaluation->read;
137 $permissiontoreadall = $user->rights->hrm->evaluation->readall;
138 $permissiontoadd = $user->rights->hrm->evaluation->write;
139 $permissiontodelete = $user->rights->hrm->evaluation->delete;
142 if (empty($conf->hrm->enabled)) {
161 if (
GETPOST(
'cancel',
'alpha')) {
165 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
169 $parameters = array();
170 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
175 if (empty($reshook)) {
177 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
180 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
181 foreach ($object->fields as $key => $val) {
183 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
184 $search[$key.
'_dtstart'] =
'';
185 $search[$key.
'_dtend'] =
'';
189 $search_array_options = array();
191 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
192 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
197 $objectclass =
'Evaluation';
198 $objectlabel =
'Evaluation';
199 $uploaddir = $conf->hrm->dir_output;
200 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
215 $title = $langs->trans(
'Evaluations');
223 $sql .= $object->getFieldList(
't');
225 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
226 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
227 $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
231 $parameters = array();
232 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
233 $sql .= preg_replace(
'/^,/',
'', $hookmanager->resPrint);
234 $sql = preg_replace(
'/,\s*$/',
'', $sql);
235 $sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
236 if (isset($extrafields->attributes[$object->table_element][
'label']) && is_array($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) {
237 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
240 $parameters = array();
241 $reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object);
242 $sql .= $hookmanager->resPrint;
243 if ($object->ismultientitymanaged == 1) {
244 $sql .=
" WHERE t.entity IN (".getEntity($object->element).
")";
246 $sql .=
" WHERE 1 = 1";
248 foreach ($search as $key => $val) {
249 if (array_key_exists($key, $object->fields)) {
250 if ($key ==
'status' && $search[$key] == -1) {
253 $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
254 if ((strpos($object->fields[$key][
'type'],
'integer:') === 0) || (strpos($object->fields[$key][
'type'],
'sellist:') === 0) || !empty($object->fields[$key][
'arrayofkeyval'])) {
255 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty($object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0', $object->fields[$key][
'arrayofkeyval'])))) {
260 if ($search[$key] !=
'') {
261 $sql .=
natural_search($key, $search[$key], (($key ==
'status') ? 2 : $mode_search));
264 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
265 $columnName=preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
266 if (preg_match(
'/^(date|timestamp|datetime)/', $object->fields[$columnName][
'type'])) {
267 if (preg_match(
'/_dtstart$/', $key)) {
268 $sql .=
" AND t." . $columnName .
" >= '" . $db->idate($search[$key]) .
"'";
270 if (preg_match(
'/_dtend$/', $key)) {
271 $sql .=
" AND t." . $columnName .
" <= '" . $db->idate($search[$key]) .
"'";
278 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
281 if (empty($permissiontoreadall)) {
282 $sql.=
" AND t.fk_user IN(".$db->sanitize(implode(
", ", $user->getAllChildIds(1))).
") ";
287 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
289 $parameters = array();
290 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
291 $sql .= $hookmanager->resPrint;
311 $sql .= $db->order($sortfield, $sortorder);
315 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
316 $resql = $db->query($sql);
328 $sql .= $db->plimit($limit + 1, $offset);
331 $resql = $db->query($sql);
337 $num = $db->num_rows(
$resql);
341 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) {
342 $obj = $db->fetch_object(
$resql);
344 header(
"Location: ".
dol_buildpath(
'/hrm/evaluation_card.php', 1).
'?id='.$id);
369 $arrayofselected = is_array($toselect) ? $toselect : array();
372 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
373 $param .=
'&contextpage='.urlencode($contextpage);
375 if ($limit > 0 && $limit != $conf->liste_limit) {
376 $param .=
'&limit='.urlencode($limit);
378 foreach ($search as $key => $val) {
379 if (is_array($search[$key]) && count($search[$key])) {
380 foreach ($search[$key] as $skey) {
381 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
384 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
387 if ($optioncss !=
'') {
388 $param .=
'&optioncss='.urlencode($optioncss);
391 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
393 $parameters = array();
394 $reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object);
395 $param .= $hookmanager->resPrint;
398 $arrayofmassactions = array(
404 if ($permissiontodelete) {
405 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
407 if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete'))) {
408 $arrayofmassactions = array();
410 $massactionbutton =
$form->selectMassAction(
'', $arrayofmassactions);
412 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
413 if ($optioncss !=
'') {
414 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
416 print
'<input type="hidden" name="token" value="'.newToken().
'">';
417 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
418 print
'<input type="hidden" name="action" value="list">';
419 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
420 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
421 print
'<input type="hidden" name="page" value="'.$page.
'">';
422 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
424 $newcardbutton =
dolGetButtonTitle($langs->trans(
'New'),
'',
'fa fa-plus-circle',
dol_buildpath(
'/hrm/evaluation_card.php', 1).
'?action=create',
'', $permissiontoadd);
426 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num,
$nbtotalofrecords,
'object_'.$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
429 $topicmail =
"SendEvaluationRef";
430 $modelmail =
"evaluation";
432 $trackid =
'xxxx'.$object->id;
433 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
436 foreach ($fieldstosearchall as $key => $val) {
437 $fieldstosearchall[$key] = $langs->trans($val);
439 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>';
447 $parameters = array();
448 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object);
449 if (empty($reshook)) {
450 $moreforfilter .= $hookmanager->resPrint;
452 $moreforfilter = $hookmanager->resPrint;
455 if (!empty($moreforfilter)) {
456 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
457 print $moreforfilter;
461 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
462 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
463 $selectedfields .= (count($arrayofmassactions) ?
$form->showCheckAddButtons(
'checkforselect', 1) :
'');
465 print
'<div class="div-table-responsive">';
466 print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
471 print
'<tr class="liste_titre">';
472 foreach ($object->fields as $key => $val) {
473 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
474 if ($key ==
'status') {
475 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
476 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
477 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
478 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
479 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
480 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
481 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
483 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
484 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
485 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
486 print
$form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], (isset($search[$key]) ? $search[$key] :
''), $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100', 1);
487 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:') === 0)) {
488 print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] :
''),
'',
'',
'search_',
'maxwidth125', 1);
489 } elseif (!preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
490 print
'<input type="text" class="flat maxwidth75" name="search_'.$key.
'" value="'.
dol_escape_htmltag(isset($search[$key]) ? $search[$key] :
'').
'">';
491 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
492 print
'<div class="nowrap">';
493 print
$form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
495 print
'<div class="nowrap">';
496 print
$form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
503 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
506 $parameters = array(
'arrayfields'=>$arrayfields);
507 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object);
508 print $hookmanager->resPrint;
510 print
'<td class="liste_titre maxwidthsearch">';
511 $searchpicto =
$form->showFilterButtons();
519 print
'<tr class="liste_titre">';
520 foreach ($object->fields as $key => $val) {
521 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
522 if ($key ==
'status') {
523 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
524 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
525 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
526 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
527 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
528 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
529 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
531 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
532 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
'')).
"\n";
536 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
538 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
539 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object);
540 print $hookmanager->resPrint;
542 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
547 $needToFetchEachLine = 0;
548 if (isset($extrafields->attributes[$object->table_element][
'computed']) && is_array($extrafields->attributes[$object->table_element][
'computed']) && count($extrafields->attributes[$object->table_element][
'computed']) > 0) {
549 foreach ($extrafields->attributes[$object->table_element][
'computed'] as $key => $val) {
550 if (preg_match(
'/\$object/', $val)) {
551 $needToFetchEachLine++;
560 $totalarray = array();
561 $totalarray[
'nbfield'] = 0;
562 while ($i < ($limit ? min($num, $limit) : $num)) {
563 $obj = $db->fetch_object(
$resql);
569 $object->setVarsFromFetchObj($obj);
572 print
'<tr class="oddeven">';
573 foreach ($object->fields as $key => $val) {
574 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
575 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
576 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
577 } elseif ($key ==
'status') {
578 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
581 if (in_array($val[
'type'], array(
'timestamp'))) {
582 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
583 } elseif ($key ==
'ref') {
584 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
587 if (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'rowid',
'status')) && empty($val[
'arrayofkeyval'])) {
588 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
592 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
593 print
'<td'.($cssforfield ?
' class="'.$cssforfield.
'"' :
'').
'>';
594 if ($key ==
'status') {
595 print $object->getLibStatut(5);
596 } elseif ($key ==
'rowid') {
597 print $object->showOutputField($val, $key, $object->id,
'');
599 print $object->showOutputField($val, $key, $object->$key,
'');
603 $totalarray[
'nbfield']++;
605 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
607 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
609 if (!isset($totalarray[
'val'])) {
610 $totalarray[
'val'] = array();
612 if (!isset($totalarray[
'val'][
't.'.$key])) {
613 $totalarray[
'val'][
't.'.$key] = 0;
615 $totalarray[
'val'][
't.'.$key] += $object->$key;
620 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
622 $parameters = array(
'arrayfields'=>$arrayfields,
'object'=>$object,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
623 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object);
624 print $hookmanager->resPrint;
626 print
'<td class="nowrap center">';
627 if ($massactionbutton || $massaction) {
629 if (in_array($object->id, $arrayofselected)) {
632 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
636 $totalarray[
'nbfield']++;
645 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
650 foreach ($arrayfields as $key => $val) {
651 if (!empty($val[
'checked'])) {
655 print
'<tr><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</td></tr>';
661 $parameters = array(
'arrayfields'=>$arrayfields,
'sql'=>$sql);
662 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
663 print $hookmanager->resPrint;
665 print
'</table>'.
"\n";
668 print
'</form>'.
"\n";
671 $hidegeneratedfilelistifempty = 1;
672 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
673 $hidegeneratedfilelistifempty = 0;
676 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
680 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
681 $urlsource .= str_replace(
'&',
'&', $param);
683 $filedir = $diroutputmassaction;
684 $genallowed = $permissiontoread;
685 $delallowed = $permissiontoadd;
687 print $formfile->showdocuments(
'massfilesarea_hrm',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'',
null, $hidegeneratedfilelistifempty);
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(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
if(isModEnabled('facture') &&!empty($user->rights->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') &&!empty($user->rights->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)) $resql
Social contributions to pay.
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...
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_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.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
dol_now($mode='auto')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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_eval($s, $returnvalue=0, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
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.
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.
$nbtotalofrecords
Count total nb of records.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.