27require_once
'../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/recruitment/lib/recruitment_recruitmentjobposition.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/recruitment/class/recruitmentjobposition.class.php';
43$langs->loadLangs(array(
"recruitment",
"other"));
45$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
46$massaction =
GETPOST(
'massaction',
'alpha');
48$confirm =
GETPOST(
'confirm',
'alpha');
49$cancel =
GETPOST(
'cancel',
'alpha');
50$toselect =
GETPOST(
'toselect',
'array:int');
51$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'recruitmentjobpositionlist';
52$backtopage =
GETPOST(
'backtopage',
'alpha');
53$optioncss =
GETPOST(
'optioncss',
'aZ');
60$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
61$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
63if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
67$offset = $limit * $page;
74$diroutputmassaction =
$conf->recruitment->dir_output.
'/temp/massgeneration/'.$user->id;
75$hookmanager->initHooks(array(
'recruitmentjobpositionlist'));
78$extrafields->fetch_name_optionals_label(
$object->table_element);
81$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
92$search_all =
GETPOST(
'search_all',
'alphanohtml');
94foreach (
$object->fields as $key => $val) {
95 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
96 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
98 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
105$fieldstosearchall = array();
106foreach (
$object->fields as $key => $val) {
107 if (!empty($val[
'searchall'])) {
108 $fieldstosearchall[
't.'.$key] = $val[
'label'];
113$arrayfields = array();
114foreach (
$object->fields as $key => $val) {
116 if (!empty($val[
'visible'])) {
117 $visible = (int)
dol_eval((
string) $val[
'visible'], 1, 1,
'1');
118 $arrayfields[
't.'.$key] = array(
119 'label' => $val[
'label'],
120 'checked' => (($visible < 0) ?
'0' :
'1'),
121 'enabled' => (
string) (int) (abs($visible) != 3 && (bool)
dol_eval((
string) $val[
'enabled'], 1)),
122 'position' => $val[
'position'],
123 'help' => isset($val[
'help']) ? $val[
'help'] :
''
128include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
131include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
134$arrayfields[
'nbapplications'] = array(
'type' =>
'integer',
'label' =>
'Applications',
'checked' => 1,
'enabled' => 1,
'position' => 90,
'csslist' =>
'right');
137$permissiontoread = $user->hasRight(
'recruitment',
'recruitmentjobposition',
'read');
138$permissiontoadd = $user->hasRight(
'recruitment',
'recruitmentjobposition',
'write');
139$permissiontodelete = $user->hasRight(
'recruitment',
'recruitmentjobposition',
'delete');
145restrictedArea($user,
'recruitment', 0,
'recruitment_recruitmentjobposition',
'recruitmentjobposition');
153if (
GETPOST(
'cancel',
'alpha')) {
157if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
161$parameters = array();
162$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
167if (empty($reshook)) {
169 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
172 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
173 foreach (
$object->fields as $key => $val) {
175 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
176 $search[$key.
'_dtstart'] =
'';
177 $search[$key.
'_dtend'] =
'';
181 $search_array_options = array();
183 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
184 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
189 $objectclass =
'RecruitmentJobPosition';
190 $objectlabel =
'RecruitmentJobPosition';
191 $uploaddir =
$conf->recruitment->dir_output;
192 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
207$title = $langs->trans(
'PositionsToBeFilled');
215$sql .=
$object->getFieldList(
't');
218if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
219 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
220 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
224$parameters = array();
225$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
226$sql .= $hookmanager->resPrint;
227$sql = preg_replace(
'/,\s*$/',
'', $sql);
228$sql .=
", COUNT(rc.rowid) as nbapplications";
229$sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
230$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"recruitment_recruitmentcandidature as rc ON rc.fk_recruitmentjobposition = t.rowid";
231if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
232 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
235$parameters = array();
236$reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object);
237$sql .= $hookmanager->resPrint;
238if (
$object->ismultientitymanaged == 1) {
239 $sql .=
" WHERE t.entity IN (".getEntity(
$object->element).
")";
241 $sql .=
" WHERE 1 = 1";
243foreach ($search as $key => $val) {
244 if (array_key_exists($key,
$object->fields)) {
245 if ($key ==
'status' && $search[$key] == -1) {
249 if ((strpos(
$object->fields[$key][
'type'],
'integer:') === 0) || (strpos(
$object->fields[$key][
'type'],
'sellist:') === 0) || !empty(
$object->fields[$key][
'arrayofkeyval'])) {
250 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty(
$object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0',
$object->fields[$key][
'arrayofkeyval'])))) {
255 if ($search[$key] !=
'') {
256 $sql .=
natural_search(
"t.".
$db->escape($key), $search[$key], (($key ==
'status') ? 2 : $mode_search));
259 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
260 $columnName = preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
261 if (preg_match(
'/^(date|timestamp|datetime)/',
$object->fields[$columnName][
'type'])) {
262 if (preg_match(
'/_dtstart$/', $key)) {
263 $sql .=
" AND t.".$db->escape($columnName).
" >= '".
$db->idate($search[$key]).
"'";
265 if (preg_match(
'/_dtend$/', $key)) {
266 $sql .=
" AND t.".$db->escape($columnName).
" <= '" .
$db->idate($search[$key]).
"'";
273 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
277include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
279$parameters = array();
280$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
281$sql .= $hookmanager->resPrint;
285foreach (
$object->fields as $key => $val) {
286 $sql .=
"t.".$db->escape($key).
", ";
289if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
290 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
291 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
"ef.".$key.
', ' :
'');
295$parameters = array();
296$reshook = $hookmanager->executeHooks(
'printFieldListGroupBy', $parameters, $object);
297$sql .= $hookmanager->resPrint;
298$sql = preg_replace(
'/,\s*$/',
'', $sql);
301$nbtotalofrecords =
'';
304 $resql =
$db->query($sql);
305 $nbtotalofrecords =
$db->num_rows($resql);
320 if (($page * $limit) > (
int) $nbtotalofrecords) {
328$sql .=
$db->order($sortfield, $sortorder);
330 $sql .=
$db->plimit($limit + 1, $offset);
333$resql =
$db->query($sql);
339$num =
$db->num_rows($resql);
343if ($num == 1 &&
getDolGlobalString(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
344 $obj =
$db->fetch_object($resql);
346 header(
"Location: ".DOL_URL_ROOT.
'/recruitment/recruitmentjobposition_card.php?id='.$id);
354llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'bodyforlist');
356$arrayofselected = is_array($toselect) ? $toselect : array();
360 $param .=
'&mode='.urlencode($mode);
362if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
363 $param .=
'&contextpage='.urlencode($contextpage);
365if ($limit > 0 && $limit !=
$conf->liste_limit) {
366 $param .=
'&limit='.((int) $limit);
368foreach ($search as $key => $val) {
369 if (is_array($search[$key]) && count($search[$key])) {
370 foreach ($search[$key] as $skey) {
372 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
375 } elseif ($search[$key] !=
'') {
376 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
379if ($optioncss !=
'') {
380 $param .=
'&optioncss='.urlencode($optioncss);
383include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
385$parameters = array(
'param' => &$param);
386$reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object);
387$param .= $hookmanager->resPrint;
390$arrayofmassactions = array(
396if ($permissiontodelete) {
397 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
399if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
400 $arrayofmassactions = array();
402$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
404print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
405if ($optioncss !=
'') {
406 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
408print
'<input type="hidden" name="token" value="'.newToken().
'">';
409print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
410print
'<input type="hidden" name="action" value="list">';
411print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
412print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
414print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
415print
'<input type="hidden" name="mode" value="'.$mode.
'">';
418$newcardbutton .= dolGetButtonTitle($langs->trans(
'ViewList'),
'',
'fa fa-bars imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=common'.preg_replace(
'/^&mode=[^&]+/',
'', $param),
'', ((empty($mode) || $mode ==
'common') ? 2 : 1), array(
'morecss' =>
'reposition'));
419$newcardbutton .= dolGetButtonTitle($langs->trans(
'ViewKanban'),
'',
'fa fa-th-list imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=kanban'.preg_replace(
'/^&mode=[^&]+/',
'', $param),
'', ($mode ==
'kanban' ? 2 : 1), array(
'morecss' =>
'reposition'));
420$newcardbutton .= dolGetButtonTitleSeparator();
421$newcardbutton .= dolGetButtonTitle($langs->trans(
'New'),
'',
'fa fa-plus-circle',
dol_buildpath(
'/recruitment/recruitmentjobposition_card.php', 1).
'?action=create&backtopage='.urlencode($_SERVER[
'PHP_SELF']),
'', $permissiontoadd);
423print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_'.
$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
426$topicmail =
"SendRecruitmentJobPositionRef";
427$modelmail =
"recruitmentjobposition";
429$trackid =
'recruitmentjobposition'.$object->id;
430include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
433 foreach ($fieldstosearchall as $key => $val) {
434 $fieldstosearchall[$key] = $langs->trans($val);
436 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>';
444$parameters = array();
445$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
446if (empty($reshook)) {
447 $moreforfilter .= $hookmanager->resPrint;
449 $moreforfilter = $hookmanager->resPrint;
452if (!empty($moreforfilter)) {
453 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
454 print $moreforfilter;
458$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
459$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
$conf->main_checkbox_left_column);
460$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
462print
'<div class="div-table-responsive">';
463print
'<table class="tagtable nobottomiftotal noborder liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
468print
'<tr class="liste_titre_filter">';
470if (
$conf->main_checkbox_left_column) {
471 print
'<td class="liste_titre maxwidthsearch">';
472 $searchpicto = $form->showFilterButtons(
'left');
476foreach (
$object->fields as $key => $val) {
477 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
478 if ($key ==
'status') {
479 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
480 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
481 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
482 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
483 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
484 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
485 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
487 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
488 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
489 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
490 print $form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], (isset($search[$key]) ? $search[$key] :
''), $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100', 1);
491 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:') === 0)) {
492 print
$object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] :
''),
'',
'',
'search_',
'maxwidth125', 1);
493 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
494 print
'<div class="nowrap">';
495 print $form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
497 print
'<div class="nowrap">';
498 print $form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
500 } elseif ($key ==
'lang') {
501 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
503 print $formadmin->select_language($search[$key],
'search_lang', 0, array(), 1, 0, 0,
'minwidth100imp maxwidth125', 2);
505 print
'<input type="text" class="flat maxwidth'.($val[
'type'] ==
'integer' ?
'50' :
'75').
'" name="search_'.$key.
'" value="'.
dol_escape_htmltag(isset($search[$key]) ? $search[$key] :
'').
'">';
511include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
514$parameters = array(
'arrayfields' => $arrayfields);
515$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object);
516print $hookmanager->resPrint;
517if (!empty($arrayfields[
'nbapplications'][
'checked'])) {
518 print
'<td class="liste_titre"></td>';
521if (!
$conf->main_checkbox_left_column) {
522 print
'<td class="liste_titre maxwidthsearch">';
523 $searchpicto = $form->showFilterButtons();
534print
'<tr class="liste_titre">';
536if (
$conf->main_checkbox_left_column) {
537 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
540foreach (
$object->fields as $key => $val) {
541 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
542 if ($key ==
'status') {
543 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
544 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
545 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
546 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
547 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
548 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
549 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
551 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
552 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
'')).
"\n";
557include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
559$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder,
'totalarray' => &$totalarray);
560$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object);
561print $hookmanager->resPrint;
562if (!empty($arrayfields[
'nbapplications'][
'checked'])) {
563 print
'<th class="liste_titre right">'.$langs->trans(
"RecruitmentCandidatures").
'</th>';
567if (!
$conf->main_checkbox_left_column) {
568 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
575$needToFetchEachLine = 0;
576if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
577 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
578 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
579 $needToFetchEachLine++;
590$imaxinloop = ($limit ? min($num, $limit) : $num);
591while ($i < $imaxinloop) {
592 $obj =
$db->fetch_object($resql);
598 $object->setVarsFromFetchObj($obj);
599 $object->date_planned = $obj->date_planned;
601 if ($mode ==
'kanban') {
603 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
604 print
'<div class="box-flex-container kanban">';
606 if ($massactionbutton || $massaction) {
611 if ($massactionbutton || $massaction) {
613 if (in_array(
$object->id, $arrayofselected)) {
617 print
$object->getKanbanView(
'', array(
'nbapplications' => $obj->nbapplications,
'selected' => $selected));
618 if ($i == ($imaxinloop - 1)) {
625 print
'<tr class="oddeven">';
627 if (
$conf->main_checkbox_left_column) {
628 print
'<td class="nowrap center">';
629 if ($massactionbutton || $massaction) {
631 if (in_array(
$object->id, $arrayofselected)) {
634 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
641 foreach (
$object->fields as $key => $val) {
642 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
643 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
644 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
645 } elseif ($key ==
'status') {
646 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
649 if (in_array($val[
'type'], array(
'timestamp'))) {
650 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
651 } elseif ($key ==
'ref') {
652 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
655 if (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'rowid',
'status')) && empty($val[
'arrayofkeyval'])) {
656 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
660 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
661 print
'<td'.($cssforfield ?
' class="'.$cssforfield.
'"' :
'').
'>';
662 if ($key ==
'status') {
663 print
$object->getLibStatut(5);
664 } elseif ($key ==
'rowid') {
665 print
$object->showOutputField($val, $key, (
string)
$object->id,
'');
673 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
677 if (!isset($totalarray[
'val'])) {
680 if (!isset($totalarray[
'val'][
't.'.$key])) {
688 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
690 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $object,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
691 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object);
692 print $hookmanager->resPrint;
693 if (!empty($arrayfields[
'nbapplications'][
'checked'])) {
694 print
'<td class="right">'.$obj->nbapplications.
'</td>';
700 if (!
$conf->main_checkbox_left_column) {
701 print
'<td class="nowrap center">';
702 if ($massactionbutton || $massaction) {
704 if (in_array(
$object->id, $arrayofselected)) {
707 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
722include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
727 foreach ($arrayfields as $key => $val) {
728 if (!empty($val[
'checked'])) {
732 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
738$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
739$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
740print $hookmanager->resPrint;
742print
'</table>'.
"\n";
747if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
748 $hidegeneratedfilelistifempty = 1;
749 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
750 $hidegeneratedfilelistifempty = 0;
753 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
757 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
758 $urlsource .= str_replace(
'&',
'&', $param);
760 $filedir = $diroutputmassaction;
761 $genallowed = $permissiontoread;
762 $delallowed = $permissiontoadd;
764 print $formfile->showdocuments(
'massfilesarea_recruitment',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'',
null, $hidegeneratedfilelistifempty);
$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.
Class for RecruitmentJobPosition.
dol_now($mode='gmt')
Return date for now.
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.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
natural_search($fields, $value, $mode=0, $nofirstand=0, $sqltoadd='')
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
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.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
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...
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
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.