47 if (!$res && !empty(
$_SERVER[
"CONTEXT_DOCUMENT_ROOT"])) $res = @include
$_SERVER[
"CONTEXT_DOCUMENT_ROOT"].
"/main.inc.php";
49 $tmp = empty(
$_SERVER[
'SCRIPT_FILENAME']) ?
'' :
$_SERVER[
'SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
50 while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; }
51 if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)).
"/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1)).
"/main.inc.php";
52 if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php";
54 if (!$res && file_exists(
"../main.inc.php")) $res = @include
"../main.inc.php";
55 if (!$res && file_exists(
"../../main.inc.php")) $res = @include
"../../main.inc.php";
56 if (!$res && file_exists(
"../../../main.inc.php")) $res = @include
"../../../main.inc.php";
57 if (!$res) die(
"Include of main fails");
59 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
60 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
61 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
64 require_once __DIR__.
'/class/recruitmentjobposition.class.php';
70 $langs->loadLangs(array(
"recruitment",
"other"));
72 $action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
73 $massaction =
GETPOST(
'massaction',
'alpha');
74 $show_files =
GETPOST(
'show_files',
'int');
75 $confirm =
GETPOST(
'confirm',
'alpha');
76 $cancel =
GETPOST(
'cancel',
'alpha');
77 $toselect =
GETPOST(
'toselect',
'array');
78 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'recruitmentjobpositionlist';
79 $backtopage =
GETPOST(
'backtopage',
'alpha');
80 $optioncss =
GETPOST(
'optioncss',
'aZ');
85 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
86 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
87 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
89 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) { $page = 0; }
90 $offset = $limit * $page;
91 $pageprev = $page - 1;
92 $pagenext = $page + 1;
97 $diroutputmassaction = $conf->recruitment->dir_output.
'/temp/massgeneration/'.$user->id;
98 $hookmanager->initHooks(array(
'recruitmentjobpositionlist'));
101 $extrafields->fetch_name_optionals_label($object->table_element);
104 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
107 if (!$sortfield) $sortfield =
"t.".key($object->fields);
108 if (!$sortorder) $sortorder =
"ASC";
111 $search_all =
GETPOST(
'search_all',
'alphanohtml') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml');
113 foreach ($object->fields as $key => $val)
115 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
119 $fieldstosearchall = array();
120 foreach ($object->fields as $key => $val)
122 if ($val[
'searchall']) $fieldstosearchall[
't.'.$key] = $val[
'label'];
126 $arrayfields = array();
127 foreach ($object->fields as $key => $val)
130 if (!empty($val[
'visible'])) {
131 $visible =
dol_eval($val[
'visible'], 1);
132 $arrayfields[
't.'.$key] = array(
133 'label'=>$val[
'label'],
134 'checked'=>(($visible < 0) ? 0 : 1),
135 'enabled'=>($visible != 3 &&
dol_eval($val[
'enabled'], 1)),
136 'position'=>$val[
'position']
141 if (is_array($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label']) > 0)
143 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val)
145 if (!empty($extrafields->attributes[$object->table_element][
'list'][$key])) {
146 $arrayfields[
"ef.".$key] = array(
147 'label'=>$extrafields->attributes[$object->table_element][
'label'][$key],
148 'checked'=>(($extrafields->attributes[$object->table_element][
'list'][$key] < 0) ? 0 : 1),
149 'position'=>$extrafields->attributes[$object->table_element][
'pos'][$key],
150 'enabled'=>(abs($extrafields->attributes[$object->table_element][
'list'][$key]) != 3 && $extrafields->attributes[$object->table_element][
'perms'][$key])
156 $arrayfields[
'nbapplications'] = array(
'label'=>
'Applications',
'checked'=>1,
'enabled'=>1,
'position'=>90);
159 $permissiontoread = $user->rights->recruitment->recruitmentjobposition->read;
160 $permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write;
161 $permissiontodelete = $user->rights->recruitment->recruitmentjobposition->delete;
164 if (empty($conf->recruitment->enabled))
accessforbidden(
'Module not enabled');
166 if ($user->socid > 0)
180 if (
GETPOST(
'cancel',
'alpha')) { $action =
'list'; $massaction =
''; }
181 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') { $massaction =
''; }
183 $parameters = array();
184 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
185 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
190 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
193 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha'))
195 foreach ($object->fields as $key => $val)
200 $search_array_options = array();
202 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
203 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha'))
209 $objectclass =
'RecruitmentJobPosition';
210 $objectlabel =
'RecruitmentJobPosition';
211 $uploaddir = $conf->recruitment->dir_output;
212 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
221 $form =
new Form($db);
227 $title = $langs->trans(
'ListOfPositionsToBeFilled');
233 foreach ($object->fields as $key => $val)
235 $sql .=
't.'.$key.
', ';
238 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
239 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
"ef.".$key.
' as options_'.$key.
', ' :
'');
242 $parameters = array();
243 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
244 $sql .= preg_replace(
'/^,/',
'', $hookmanager->resPrint);
245 $sql = preg_replace(
'/,\s*$/',
'', $sql);
246 $sql .=
", COUNT(rc.rowid) as nbapplications";
247 $sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
248 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"recruitment_recruitmentcandidature as rc ON rc.fk_recruitmentjobposition = t.rowid";
249 if (is_array($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
250 if ($object->ismultientitymanaged == 1) $sql .=
" WHERE t.entity IN (".getEntity($object->element).
")";
251 else $sql .=
" WHERE 1 = 1";
252 foreach ($search as $key => $val)
254 if ($key ==
'status' && $search[$key] == -1)
continue;
255 $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
256 if (strpos($object->fields[$key][
'type'],
'integer:') === 0) {
257 if ($search[$key] ==
'-1') $search[$key] =
'';
260 if ($search[$key] !=
'') $sql .=
natural_search($key, $search[$key], (($key ==
'status') ? 2 : $mode_search));
262 if ($search_all) $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
265 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
267 $parameters = array();
268 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
269 $sql .= $hookmanager->resPrint;
272 $sql .=
" GROUP BY ";
273 foreach ($object->fields as $key => $val)
275 $sql .=
't.'.$key.
', ';
278 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
279 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
"ef.".$key.
', ' :
'');
282 $parameters = array();
283 $reshook = $hookmanager->executeHooks(
'printFieldListGroupBy', $parameters);
284 $sql .= $hookmanager->resPrint;
285 $sql = preg_replace(
'/,\s*$/',
'', $sql);
287 $sql .= $db->order($sortfield, $sortorder);
290 $nbtotalofrecords =
'';
291 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
293 $resql = $db->query($sql);
294 $nbtotalofrecords = $db->num_rows(
$resql);
295 if (($page * $limit) > $nbtotalofrecords)
302 if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit)))
304 $num = $nbtotalofrecords;
306 if ($limit) $sql .= $db->plimit($limit + 1, $offset);
308 $resql = $db->query($sql);
315 $num = $db->num_rows(
$resql);
319 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page)
321 $obj = $db->fetch_object(
$resql);
323 header(
"Location: ".
dol_buildpath(
'/recruitment/recruitmentjobposition_card.php', 1).
'?id='.$id);
334 print '<script type="text/javascript" language="javascript">
335 jQuery(document).ready(function() {
336 function init_myfunc()
338 jQuery("#myid").removeAttr(\'disabled\');
339 jQuery("#myid").attr(\'disabled\',\'disabled\');
342 jQuery("#mybutton").click(function() {
348 $arrayofselected = is_array($toselect) ? $toselect : array();
351 if (!empty($contextpage) && $contextpage !=
$_SERVER[
"PHP_SELF"]) $param .=
'&contextpage='.urlencode($contextpage);
352 if ($limit > 0 && $limit != $conf->liste_limit) $param .=
'&limit='.urlencode($limit);
353 foreach ($search as $key => $val)
355 if (is_array($search[$key]) && count($search[$key]))
foreach ($search[$key] as $skey) $param .=
'&search_'.$key.
'[]='.urlencode($skey);
356 else $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
358 if ($optioncss !=
'') $param .=
'&optioncss='.urlencode($optioncss);
360 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
363 $arrayofmassactions = array(
369 if ($permissiontodelete) $arrayofmassactions[
'predelete'] =
'<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans(
"Delete");
370 if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete'))) $arrayofmassactions = array();
371 $massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
373 print '<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
374 if ($optioncss !=
'')
print '<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
375 print '<input type="hidden" name="token" value="'.newToken().
'">';
376 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
377 print '<input type="hidden" name="action" value="list">';
378 print '<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
379 print '<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
381 print '<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
383 $newcardbutton =
dolGetButtonTitle($langs->trans(
'New'),
'',
'fa fa-plus-circle',
dol_buildpath(
'/recruitment/recruitmentjobposition_card.php', 1).
'?action=create&backtopage='.urlencode(
$_SERVER[
'PHP_SELF']),
'', $permissiontoadd);
385 print_barre_liste($title, $page,
$_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_'.$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
388 $topicmail =
"SendRecruitmentJobPositionRef";
389 $modelmail =
"recruitmentjobposition";
391 $trackid =
'recruitmentjobposition'.$object->id;
392 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
396 foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val);
397 print '<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>';
405 $parameters = array();
406 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object);
407 if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
408 else $moreforfilter = $hookmanager->resPrint;
410 if (!empty($moreforfilter))
412 print '<div class="liste_titre liste_titre_bydiv centpercent">';
413 print $moreforfilter;
417 $varpage = empty($contextpage) ?
$_SERVER[
"PHP_SELF"] : $contextpage;
418 $selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
419 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
421 print '<div class="div-table-responsive">';
422 print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
427 print '<tr class="liste_titre">';
428 foreach ($object->fields as $key => $val)
430 $cssforfield = (empty($val[
'css']) ?
'' : $val[
'css']);
431 if ($key ==
'status') $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
432 elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center';
433 elseif (in_array($val['
type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
434 elseif (in_array($val['type'], array('
double(24,8)', '
double(6,3)', 'integer', 'real', '
price')) && $val['label'] != 'TechnicalID') $cssforfield .= ($cssforfield ? ' ' : '').'right';
435 if (!empty($arrayfields['t.'.$key]['checked']))
437 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
438 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) print $form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], $search[$key], $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100', 1);
439 elseif (strpos($val[
'type'],
'integer:') === 0) {
440 print $object->showInputField($val, $key, $search[$key],
'',
'',
'search_',
'maxwidth150', 1);
441 } elseif (!preg_match(
'/^(date|timestamp)/', $val[
'type'])) print '<input type="text" class="flat maxwidth75"
name="search_'.$key.'" value="'.
dol_escape_htmltag($search[$key]).'">';
446 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
448 $parameters = array('arrayfields'=>$arrayfields);
449 $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object);
450 print $hookmanager->resPrint;
451 if (!empty($arrayfields['nbapplications']['checked']))
453 print
'<td class="liste_titre"></td>';
456 print
'<td class="liste_titre maxwidthsearch">';
457 $searchpicto = $form->showFilterButtons();
465 print
'<tr class="liste_titre">';
466 foreach ($object->fields as $key => $val)
468 $cssforfield = (empty($val[
'css']) ?
'' : $val[
'css']);
469 if ($key ==
'status') $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
470 elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center';
471 elseif (in_array($val['type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
472 elseif (in_array($val['type'], array('
double(24,8)', '
double(6,3)', 'integer', 'real', '
price')) && $val['label'] != 'TechnicalID') $cssforfield .= ($cssforfield ? ' ' : '').'right';
473 if (!empty($arrayfields['t.'.$key]['checked']))
475 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0,
$_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
'')).
"\n";
479 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
481 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
482 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object);
483 print $hookmanager->resPrint;
484 if (!empty($arrayfields[
'nbapplications'][
'checked']))
486 print
'<td class="liste_titre">'.$langs->trans(
"Applications").
'</td>';
489 print
getTitleFieldOfList($selectedfields, 0,
$_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
494 $needToFetchEachLine = 0;
495 if (is_array($extrafields->attributes[$object->table_element][
'computed']) && count($extrafields->attributes[$object->table_element][
'computed']) > 0)
497 foreach ($extrafields->attributes[$object->table_element][
'computed'] as $key => $val)
499 if (preg_match(
'/\$object/', $val)) $needToFetchEachLine++;
507 $totalarray = array();
508 while ($i < ($limit ? min($num, $limit) : $num))
510 $obj = $db->fetch_object(
$resql);
511 if (empty($obj))
break;
514 $object->setVarsFromFetchObj($obj);
517 print
'<tr class="oddeven">';
518 foreach ($object->fields as $key => $val)
520 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
521 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
522 elseif ($key ==
'status') $cssforfield .= ($cssforfield ? ' ' : '').'center';
524 if (in_array($val['type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
525 elseif ($key == 'ref') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
527 if (in_array($val['type'], array('
double(24,8)', '
double(6,3)', 'integer', 'real', '
price')) && $key != 'status') $cssforfield .= ($cssforfield ? ' ' : '').'right';
530 if (!empty($arrayfields['t.'.$key]['checked']))
532 print
'<td'.($cssforfield ?
' class="'.$cssforfield.
'"' :
'').
'>';
533 if ($key ==
'status') print $object->getLibStatut(5);
534 else print $object->showOutputField($val, $key, $object->$key,
'');
536 if (!$i) $totalarray[
'nbfield']++;
537 if (!empty($val[
'isameasure']))
539 if (!$i) $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
540 $totalarray[
'val'][
't.'.$key] += $object->$key;
545 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
547 $parameters = array(
'arrayfields'=>$arrayfields,
'object'=>$object,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
548 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object);
549 print $hookmanager->resPrint;
550 if (!empty($arrayfields[
'nbapplications'][
'checked']))
552 print
'<td class="right">'.$obj->nbapplications.
'</td>';
555 print
'<td class="nowrap center">';
556 if ($massactionbutton || $massaction)
559 if (in_array($object->id, $arrayofselected)) $selected = 1;
560 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
563 if (!$i) $totalarray[
'nbfield']++;
571 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
577 foreach ($arrayfields as $key => $val) {
if (!empty($val[
'checked'])) $colspan++; }
578 print
'<tr><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</td></tr>';
584 $parameters = array(
'arrayfields'=>$arrayfields,
'sql'=>$sql);
585 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
586 print $hookmanager->resPrint;
588 print
'</table>'.
"\n";
591 print
'</form>'.
"\n";
593 if (in_array(
'builddoc', $arrayofmassactions) && ($nbtotalofrecords ===
'' || $nbtotalofrecords))
595 $hidegeneratedfilelistifempty = 1;
596 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0;
598 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
602 $urlsource =
$_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
603 $urlsource .= str_replace(
'&',
'&', $param);
605 $filedir = $diroutputmassaction;
606 $genallowed = $permissiontoread;
607 $delallowed = $permissiontoadd;
609 print $formfile->showdocuments(
'massfilesarea_recruitment',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'', null, $hidegeneratedfilelistifempty);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_eval($s, $returnvalue=0, $hideerrors=1)
Replace eval function to add more security.
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_now($mode= 'auto')
Return date for now.
$conf db name
Only used if Module[ID]Name translation string is not found.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
price($amount, $form=0, $outlangs= '', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code= '')
Function to format a value into an amount for visual output Function used into PDF and HTML pages...
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
print_barre_liste($titre, $page, $file, $options= '', $sortfield= '', $sortorder= '', $morehtmlcenter= '', $num=-1, $totalnboflines= '', $picto= 'generic', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow= '')
Print a title with navigation controls for pagination.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
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...
Class for RecruitmentJobPosition.
print $_SERVER["PHP_SELF"]
Edit parameters.
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...
print
Draft customers invoices.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip= '', $forcenowrapcolumntitle=0)
Get title line of an array.
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $keepmoretags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...