dolibarr 21.0.0-beta
recruitmentcandidature_list.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
26// Load Dolibarr environment
27require_once '../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment.lib.php';
29require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment_recruitmentjobposition.lib.php';
30require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
31require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
32require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
33require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php';
34require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php';
35
44// Load translation files required by the page
45$langs->loadLangs(array("recruitment", "other"));
46
47$id = GETPOSTINT('id');
48$ref = GETPOST('ref', 'alpha');
49
50$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
51$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
52$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ?
53$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
54$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
55$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
56$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : ((empty($id) && empty($ref)) ? 'recruitmentcandidaturelist' : 'recruitmentjobposition_candidature'); // To manage different context of search
57$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
58$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
59$mode = GETPOST('mode', 'aZ');
60$lineid = GETPOSTINT('lineid');
61
62// Load variable for pagination
63$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
64$sortfield = GETPOST('sortfield', 'aZ09comma');
65$sortorder = GETPOST('sortorder', 'aZ09comma');
66$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
67if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
68 // If $page is not defined, or '' or -1 or if we click on clear filters
69 $page = 0;
70}
71$offset = $limit * $page;
72$pageprev = $page - 1;
73$pagenext = $page + 1;
74
75// Initialize a technical objects
77$extrafields = new ExtraFields($db);
78$diroutputmassaction = $conf->recruitment->dir_output.'/temp/massgeneration/'.$user->id;
79$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes
80
81// Fetch optionals attributes and labels
82$extrafields->fetch_name_optionals_label($object->table_element);
83//$extrafields->fetch_name_optionals_label($object->table_element_line);
84
85$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
86
87// Default sort order (if not yet defined by previous GETPOST)
88if (!$sortfield) {
89 $sortfield = "t.date_creation"; // Set here default search field. By default 1st field in definition.
90}
91if (!$sortorder) {
92 $sortorder = "DESC";
93}
94
95// Initialize array of search criteria
96$search_all = GETPOST('search_all', 'alphanohtml');
97$search = array();
98foreach ($object->fields as $key => $val) {
99 if (GETPOST('search_'.$key, 'alpha') !== '') {
100 $search[$key] = GETPOST('search_'.$key, 'alpha');
101 }
102 if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
103 $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOSTINT('search_'.$key.'_dtstartmonth'), GETPOSTINT('search_'.$key.'_dtstartday'), GETPOSTINT('search_'.$key.'_dtstartyear'));
104 $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOSTINT('search_'.$key.'_dtendmonth'), GETPOSTINT('search_'.$key.'_dtendday'), GETPOSTINT('search_'.$key.'_dtendyear'));
105 }
106}
107
108// List of fields to search into when doing a "search in all"
109$fieldstosearchall = array();
110foreach ($object->fields as $key => $val) {
111 if (!empty($val['searchall'])) {
112 $fieldstosearchall['t.'.$key] = $val['label'];
113 }
114}
115/*$parameters = array('fieldstosearchall'=>$fieldstosearchall);
116$reshook = $hookmanager->executeHooks('completeFieldsToSearchAll', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
117if ($reshook > 0) {
118 $fieldstosearchall = $hookmanager->resArray['fieldstosearchall'];
119} elseif ($reshook == 0) {
120 $fieldstosearchall = array_merge($fieldstosearchall, $hookmanager->resArray['fieldstosearchall']);
121}*/
122
123// Definition of array of fields for columns
124$arrayfields = array();
125foreach ($object->fields as $key => $val) {
126 // If $val['visible']==0, then we never show the field
127 if (!empty($val['visible'])) {
128 $visible = (int) dol_eval((string) $val['visible'], 1);
129 $arrayfields['t.'.$key] = array(
130 'label' => $val['label'],
131 'checked' => (($visible < 0) ? 0 : 1),
132 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)),
133 'position' => $val['position'],
134 'help' => isset($val['help']) ? $val['help'] : ''
135 );
136 }
137}
138// Extra fields
139include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
140
141// Load object
142$jobposition = new RecruitmentJobPosition($db);
143if ($id > 0 || !empty($ref)) {
144 $jobposition->fetch($id, $ref);
145 $id = $jobposition->id;
146}
147
148$object->fields = dol_sort_array($object->fields, 'position');
149$arrayfields = dol_sort_array($arrayfields, 'position');
150
151$permissiontoread = $user->hasRight('recruitment', 'recruitmentjobposition', 'read');
152$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write');
153$permissiontodelete = $user->hasRight('recruitment', 'recruitmentjobposition', 'delete');
154
155// Security check - Protection if external user
156//if ($user->socid > 0) accessforbidden();
157//if ($user->socid > 0) $socid = $user->socid;
158//$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
159if ($jobposition->id > 0) {
160 $isdraft = (($jobposition->status == $jobposition::STATUS_DRAFT) ? 1 : 0);
161 $result = restrictedArea($user, 'recruitment', $jobposition->id, 'recruitment_recruitmentjobposition', 'recruitmentjobposition', '', 'rowid', $isdraft);
162} else {
163 $result = restrictedArea($user, 'recruitment', 0, 'recruitment_recruitmentcandidature', 'recruitmentjobposition');
164}
165
166
167
168/*
169 * Actions
170 */
171
172if (GETPOST('cancel', 'alpha')) {
173 $action = 'list';
174 $massaction = '';
175}
176if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
177 $massaction = '';
178}
179
180$parameters = array();
181$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
182if ($reshook < 0) {
183 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
184}
185
186if (empty($reshook)) {
187 // Selection of new fields
188 include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
189
190 // Purge search criteria
191 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
192 foreach ($object->fields as $key => $val) {
193 $search[$key] = '';
194 if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
195 $search[$key.'_dtstart'] = '';
196 $search[$key.'_dtend'] = '';
197 }
198 }
199 $toselect = array();
200 $search_array_options = array();
201 }
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')) {
204 $massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation
205 }
206
207 // Mass actions
208 $objectclass = 'RecruitmentCandidature';
209 $objectlabel = 'RecruitmentCandidature';
210 $uploaddir = $conf->recruitment->dir_output;
211 include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
212}
213
214
215
216/*
217 * View
218 */
219
220$form = new Form($db);
221
222$now = dol_now();
223
224//$help_url="EN:Module_RecruitmentCandidature|FR:Module_RecruitmentCandidature_FR|ES:Módulo_RecruitmentCandidature";
225$help_url = '';
226$title = $langs->trans('RecruitmentCandidatures');
227$morejs = array();
228$morecss = array();
229
230
231// Build and execute select
232// --------------------------------------------------------------------
233$sql = 'SELECT ';
234$sql .= $object->getFieldList('t');
235// Add fields from extrafields
236if (!empty($extrafields->attributes[$object->table_element]['label'])) {
237 foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
238 $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
239 }
240}
241// Add fields from hooks
242$parameters = array();
243$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
244$sql .= $hookmanager->resPrint;
245$sql = preg_replace('/,\s*$/', '', $sql);
246
247$sqlfields = $sql; // $sql fields to remove for count total
248
249$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
250if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
251 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
252}
253// Add table from hooks
254$parameters = array();
255$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
256$sql .= $hookmanager->resPrint;
257if ($object->ismultientitymanaged == 1) {
258 $sql .= " WHERE t.entity IN (".getEntity($object->element).")";
259} else {
260 $sql .= " WHERE 1 = 1";
261}
262foreach ($search as $key => $val) {
263 if (array_key_exists($key, $object->fields)) {
264 if ($key == 'status' && $search[$key] == -1) {
265 continue;
266 }
267 $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
268 if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) {
269 if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($object->fields[$key]['arrayofkeyval']) || !array_key_exists('0', $object->fields[$key]['arrayofkeyval'])))) {
270 $search[$key] = '';
271 }
272 $mode_search = 2;
273 }
274 if ($search[$key] != '') {
275 $sql .= natural_search("t.".$db->escape($key), $search[$key], (($key == 'status') ? 2 : $mode_search));
276 }
277 } else {
278 if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') {
279 $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key);
280 if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) {
281 if (preg_match('/_dtstart$/', $key)) {
282 $sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'";
283 }
284 if (preg_match('/_dtend$/', $key)) {
285 $sql .= " AND t.".$db->escape($columnName)." <= '" . $db->idate($search[$key])."'";
286 }
287 }
288 }
289 }
290}
291if ($search_all) {
292 $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
293}
294if (!empty($id)) {
295 $sql .= " AND t.fk_recruitmentjobposition = ".((int) $id);
296}
297//$sql.= dolSqlDateFilter("t.field", $search_xxxday, $search_xxxmonth, $search_xxxyear);
298// Add where from extra fields
299include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
300// Add where from hooks
301$parameters = array();
302$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
303$sql .= $hookmanager->resPrint;
304
305/* If a group by is required
306$sql.= " GROUP BY ";
307foreach ($object->fields as $key => $val) {
308 $sql .= "t.".$db->escape($key).", ";
309}
310// Add fields from extrafields
311if (!empty($extrafields->attributes[$object->table_element]['label'])) {
312 foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
313 $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : '');
314 }
315}
316// Add where from hooks
317$parameters=array();
318$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook
319$sql .= $hookmanager->resPrint;
320$sql = preg_replace('/,\s*$/', '', $sql);
321*/
322
323// Count total nb of records
324$nbtotalofrecords = '';
325if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
326 /* The fast and low memory method to get and count full list converts the sql into a sql count */
327 $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
328 $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
329 $resql = $db->query($sqlforcount);
330 if ($resql) {
331 $objforcount = $db->fetch_object($resql);
332 $nbtotalofrecords = $objforcount->nbtotalofrecords;
333 } else {
334 dol_print_error($db);
335 }
336
337 if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
338 $page = 0;
339 $offset = 0;
340 }
341 $db->free($resql);
342}
343
344// Complete request and execute it with limit
345$sql .= $db->order($sortfield, $sortorder);
346if ($limit) {
347 $sql .= $db->plimit($limit + 1, $offset);
348}
349
350$resql = $db->query($sql);
351if (!$resql) {
352 dol_print_error($db);
353 exit;
354}
355
356$num = $db->num_rows($resql);
357
358
359// Direct jump if only one record found
360if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
361 $obj = $db->fetch_object($resql);
362 $id = $obj->rowid;
363 header("Location: ".DOL_URL_ROOT.'/recruitment/recruitmentcandidature_card.php?id='.$id);
364 exit;
365}
366
367
368// Output page
369// --------------------------------------------------------------------
370
371llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');
372
373
374// Part to show record
375
376if ($jobposition->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
377 $savobject = $object;
378
379 $object = $jobposition;
380
381 $res = $object->fetch_optionals();
382
383 $head = recruitmentjobpositionPrepareHead($object);
384 print dol_get_fiche_head($head, 'candidatures', $langs->trans("RecruitmentCandidatures"), -1, $object->picto);
385
386 $formconfirm = '';
387
388 // Confirmation to delete
389 if ($action == 'delete') {
390 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteRecruitmentJobPosition'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
391 }
392 // Confirmation to delete line
393 if ($action == 'deleteline') {
394 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
395 }
396 // Clone confirmation
397 if ($action == 'clone') {
398 // Create an array for form
399 $formquestion = array();
400 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
401 }
402
403 // Confirmation of action xxxx
404 if ($action == 'xxx') {
405 $formquestion = array();
406 /*
407 $forcecombo=0;
408 if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
409 $formquestion = array(
410 // 'text' => $langs->trans("ConfirmClone"),
411 // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
412 // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
413 // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo))
414 );
415 */
416 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220);
417 }
418
419 // Call Hook formConfirm
420 $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
421 $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
422 if (empty($reshook)) {
423 $formconfirm .= $hookmanager->resPrint;
424 } elseif ($reshook > 0) {
425 $formconfirm = $hookmanager->resPrint;
426 }
427
428 // Print form confirm
429 print $formconfirm;
430
431
432 // Object card
433 // ------------------------------------------------------------
434 $linkback = '<a href="'.dol_buildpath('/recruitment/recruitmentjobposition_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
435
436 $morehtmlref = '<div class="refidno">';
437 /*
438 // Ref customer
439 $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
440 $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
441 // Thirdparty
442 $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
443 */
444 // Project
445 if (isModEnabled('project')) {
446 $langs->load("projects");
447 $morehtmlref .= $langs->trans('Project').' ';
448 if ($permissiontoadd) {
449 if ($action != 'classify') {
450 $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a>';
451 }
452 $morehtmlref .= ' : ';
453 if ($action == 'classify') {
454 //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
455 $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
456 $morehtmlref .= '<input type="hidden" name="action" value="classin">';
457 $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
458 $morehtmlref .= $formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
459 $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
460 $morehtmlref .= '</form>';
461 } else {
462 $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, !empty($object->socid) ? $object->socid : 0, $object->fk_project, 'none', 0, 0, 0, 1, '', 'maxwidth300');
463 }
464 } else {
465 if (!empty($object->fk_project)) {
466 $proj = new Project($db);
467 $proj->fetch($object->fk_project);
468 $morehtmlref .= ': '.$proj->getNomUrl();
469 } else {
470 $morehtmlref .= '';
471 }
472 }
473 }
474 $morehtmlref .= '</div>';
475
476
477 dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
478
479
480 print '<div class="fichecenter">';
481 print '<div class="fichehalfleft">';
482 print '<div class="underbanner clearboth"></div>';
483 print '<table class="border centpercent tableforfield">'."\n";
484
485 // Common attributes
486 $keyforbreak = 'description'; // We change column just after this field
487 unset($object->fields['fk_project']); // Hide field already shown in banner
488 //unset($object->fields['fk_soc']); // Hide field already shown in banner
489 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
490
491 // Other attributes. Fields from hook formObjectOptions and Extrafields.
492 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
493
494 print '</table>';
495 print '</div>';
496 print '</div>';
497
498 print '<div class="clearboth"></div>';
499
500 print dol_get_fiche_end();
501
502 print '<br>';
503
504 $object = $savobject;
505}
506
507
508$arrayofselected = is_array($toselect) ? $toselect : array();
509
510$param = '';
511if (!empty($id)) {
512 $param .= '&id='.urlencode((string) ($id));
513}
514if (!empty($mode)) {
515 $param .= '&mode='.urlencode($mode);
516}
517if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
518 $param .= '&contextpage='.urlencode($contextpage);
519}
520if ($limit > 0 && $limit != $conf->liste_limit) {
521 $param .= '&limit='.((int) $limit);
522}
523foreach ($search as $key => $val) {
524 if (is_array($search[$key])) {
525 foreach ($search[$key] as $skey) {
526 if ($skey != '') {
527 $param .= '&search_'.$key.'[]='.urlencode($skey);
528 }
529 }
530 } elseif ($search[$key] != '') {
531 $param .= '&search_'.$key.'='.urlencode($search[$key]);
532 }
533}
534if ($optioncss != '') {
535 $param .= '&optioncss='.urlencode($optioncss);
536}
537// Add $param from extra fields
538include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
539// Add $param from hooks
540$parameters = array('param' => &$param);
541$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook
542$param .= $hookmanager->resPrint;
543
544// List of mass actions available
545$arrayofmassactions = array(
546 'validate' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
547 //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
548 //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
549 //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
550);
551if (!empty($permissiontodelete)) {
552 $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
553}
554if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) {
555 $arrayofmassactions = array();
556}
557$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
558
559print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
560if ($optioncss != '') {
561 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
562}
563print '<input type="hidden" name="token" value="'.newToken().'">';
564print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
565print '<input type="hidden" name="action" value="list">';
566print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
567print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
568print '<input type="hidden" name="page" value="'.$page.'">';
569print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
570print '<input type="hidden" name="mode" value="'.$mode.'">';
571print '<input type="hidden" name="id" value="'.$id.'">';
572
573
574$newcardbutton = '';
575$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'));
576$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'));
577$newcardbutton .= dolGetButtonTitleSeparator();
578$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/recruitment/recruitmentcandidature_card.php', 1).'?action=create&fk_recruitmentjobposition='.$id, '', $permissiontoadd);
579
580print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
581
582// Add code for pre mass action (confirmation or email presend form)
583$topicmail = "SendRecruitmentCandidatureRef";
584$modelmail = "recruitmentcandidature";
585$objecttmp = new RecruitmentCandidature($db);
586$trackid = 'recruitmentapplication'.$object->id;
587include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
588
589if ($search_all) {
590 $setupstring = '';
591 foreach ($fieldstosearchall as $key => $val) {
592 $fieldstosearchall[$key] = $langs->trans($val);
593 $setupstring .= $key."=".$val.";";
594 }
595 print '<!-- Search done like if RECRUITMENT_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
596 print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).implode(', ', $fieldstosearchall).'</div>'."\n";
597}
598
599$moreforfilter = '';
600/*$moreforfilter.='<div class="divsearchfield">';
601$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
602$moreforfilter.= '</div>';*/
603
604$parameters = array();
605$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
606if (empty($reshook)) {
607 $moreforfilter .= $hookmanager->resPrint;
608} else {
609 $moreforfilter = $hookmanager->resPrint;
610}
611
612if (!empty($moreforfilter)) {
613 print '<div class="liste_titre liste_titre_bydiv centpercent">';
614 print $moreforfilter;
615 print '</div>';
616}
617
618$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
619$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
620$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
621
622print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
623print '<table class="tagtable nobottomiftotal noborder liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
624
625
626// Fields title search
627// --------------------------------------------------------------------
628print '<tr class="liste_titre_filter">';
629// Action column
630if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
631 print '<td class="liste_titre maxwidthsearch center">';
632 $searchpicto = $form->showFilterButtons('left');
633 print $searchpicto;
634 print '</td>';
635}
636foreach ($object->fields as $key => $val) {
637 $searchkey = empty($search[$key]) ? '' : $search[$key];
638 $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
639 if ($key == 'status') {
640 $cssforfield .= ($cssforfield ? ' ' : '').'center';
641 } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
642 $cssforfield .= ($cssforfield ? ' ' : '').'center';
643 } elseif (in_array($val['type'], array('timestamp'))) {
644 $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
645 } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
646 $cssforfield .= ($cssforfield ? ' ' : '').'right';
647 }
648 if (!empty($arrayfields['t.'.$key]['checked'])) {
649 print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').($key == 'status' ? ' parentonrightofpage' : '').'">';
650 if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
651 print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100'.($key == 'status' ? ' search_status width100 onrightofpage' : ''), 1);
652 } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) {
653 print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1);
654 } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
655 print '<div class="nowrap">';
656 print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
657 print '</div>';
658 print '<div class="nowrap">';
659 print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
660 print '</div>';
661 } elseif ($key == 'lang') {
662 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
663 $formadmin = new FormAdmin($db);
664 print $formadmin->select_language($search[$key], 'search_lang', 0, array(), 1, 0, 0, 'minwidth100imp maxwidth125', 2);
665 } else {
666 print '<input type="text" class="flat maxwidth'.($val['type'] == 'integer' ? '50' : '75').'" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">';
667 }
668 print '</td>';
669 }
670}
671// Extra fields
672include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
673
674// Fields from hook
675$parameters = array('arrayfields' => $arrayfields);
676$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
677print $hookmanager->resPrint;
678// Action column
679if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
680 print '<td class="liste_titre center maxwidthsearch">';
681 $searchpicto = $form->showFilterButtons();
682 print $searchpicto;
683 print '</td>';
684}
685print '</tr>'."\n";
686
687$totalarray = array();
688$totalarray['nbfield'] = 0;
689
690// Fields title label
691// --------------------------------------------------------------------
692print '<tr class="liste_titre">';
693if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
694 print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
695 $totalarray['nbfield']++;
696}
697foreach ($object->fields as $key => $val) {
698 $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
699 if ($key == 'status') {
700 $cssforfield .= ($cssforfield ? ' ' : '').'center';
701 } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
702 $cssforfield .= ($cssforfield ? ' ' : '').'center';
703 } elseif (in_array($val['type'], array('timestamp'))) {
704 $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
705 } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
706 $cssforfield .= ($cssforfield ? ' ' : '').'right';
707 }
708 $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
709 if (!empty($arrayfields['t.'.$key]['checked'])) {
710 print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n";
711 $totalarray['nbfield']++;
712 }
713}
714// Extra fields
715include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
716// Hook fields
717$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
718$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
719print $hookmanager->resPrint;
720// Action column
721if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
722 print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
723 $totalarray['nbfield']++;
724}
725print '</tr>'."\n";
726
727
728// Detect if we need a fetch on each output line
729$needToFetchEachLine = 0;
730if (isset($extrafields->attributes[$object->table_element]['computed']) && is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) {
731 foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) {
732 if (!is_null($val) && preg_match('/\$object/', $val)) {
733 $needToFetchEachLine++; // There is at least one compute field that use $object
734 }
735 }
736}
737
738
739// Loop on record
740// --------------------------------------------------------------------
741$i = 0;
742$savnbfield = $totalarray['nbfield'];
743$totalarray = array();
744$totalarray['nbfield'] = 0;
745$imaxinloop = ($limit ? min($num, $limit) : $num);
746while ($i < $imaxinloop) {
747 $obj = $db->fetch_object($resql);
748 if (empty($obj)) {
749 break; // Should not happen
750 }
751
752 // Store properties in $object
753 $object->setVarsFromFetchObj($obj);
754
755 if ($mode == 'kanban') {
756 if ($i == 0) {
757 print '<tr class="trkanban"><td colspan="'.$savnbfield.'">';
758 print '<div class="box-flex-container kanban">';
759 }
760 // TODO Use a cache for $recruitment
761 $recruitment = new RecruitmentJobPosition($db);
762 $recruitment->fetch($obj->fk_recruitmentjobposition);
763
764 $object->phone = $obj->phone;
765
766 // Output Kanban
767 $selected = -1;
768 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
769 $selected = 0;
770 if (in_array($object->id, $arrayofselected)) {
771 $selected = 1;
772 }
773 }
774 print $object->getKanbanView('', array('jobpositionlink' => $recruitment->getNomUrl(1), 'selected' => $selected));
775 if ($i == ($imaxinloop - 1)) {
776 print '</div>';
777 print '</td></tr>';
778 }
779 } else {
780 // Show here line of result
781 $j = 0;
782 print '<tr data-rowid="'.$object->id.'" class="oddeven">';
783 // Action column
784 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
785 print '<td class="nowrap center">';
786 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
787 $selected = 0;
788 if (in_array($object->id, $arrayofselected)) {
789 $selected = 1;
790 }
791 print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
792 }
793 print '</td>';
794 if (!$i) {
795 $totalarray['nbfield']++;
796 }
797 }
798 foreach ($object->fields as $key => $val) {
799 $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
800 if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
801 $cssforfield .= ($cssforfield ? ' ' : '').'center';
802 } elseif ($key == 'status') {
803 $cssforfield .= ($cssforfield ? ' ' : '').'center';
804 }
805
806 if (in_array($val['type'], array('timestamp'))) {
807 $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
808 } elseif ($key == 'ref') {
809 $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
810 }
811
812 if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) {
813 $cssforfield .= ($cssforfield ? ' ' : '').'right';
814 }
815 //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100';
816
817 if (!empty($arrayfields['t.'.$key]['checked'])) {
818 print '<td'.($cssforfield ? ' class="'.$cssforfield.(preg_match('/tdoverflow/', $cssforfield) ? ' classfortooltip' : '').'"' : '');
819 if (preg_match('/tdoverflow/', $cssforfield) && !is_numeric($object->$key)) {
820 print ' title="'.dol_escape_htmltag($object->$key).'"';
821 }
822 print '>';
823 if ($key == 'status') {
824 print $object->getLibStatut(5);
825 } elseif ($key == 'rowid') {
826 print $object->showOutputField($val, $key, $object->id, '');
827 } else {
828 print $object->showOutputField($val, $key, $object->$key, '');
829 }
830 print '</td>';
831 if (!$i) {
832 $totalarray['nbfield']++;
833 }
834 if (!empty($val['isameasure']) && $val['isameasure'] == 1) {
835 if (!$i) {
836 $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key;
837 }
838 if (!isset($totalarray['val'])) {
839 $totalarray['val'] = array();
840 }
841 if (!isset($totalarray['val']['t.'.$key])) {
842 $totalarray['val']['t.'.$key] = 0;
843 }
844 $totalarray['val']['t.'.$key] += $object->$key;
845 }
846 }
847 }
848 // Extra fields
849 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
850 // Fields from hook
851 $parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
852 $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
853 print $hookmanager->resPrint;
854 // Action column
855 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
856 print '<td class="nowrap center">';
857 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
858 $selected = 0;
859 if (in_array($object->id, $arrayofselected)) {
860 $selected = 1;
861 }
862 print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
863 }
864 print '</td>';
865 if (!$i) {
866 $totalarray['nbfield']++;
867 }
868 }
869
870 print '</tr>'."\n";
871 }
872
873 $i++;
874}
875
876// Show total line
877include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
878
879// If no record found
880if ($num == 0) {
881 $colspan = 1;
882 foreach ($arrayfields as $key => $val) {
883 if (!empty($val['checked'])) {
884 $colspan++;
885 }
886 }
887 print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
888}
889
890
891$db->free($resql);
892
893$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
894$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
895print $hookmanager->resPrint;
896
897print '</table>'."\n";
898print '</div>'."\n";
899
900print '</form>'."\n";
901
902if (in_array('builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords === '' || $nbtotalofrecords)) {
903 $hidegeneratedfilelistifempty = 1;
904 if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) {
905 $hidegeneratedfilelistifempty = 0;
906 }
907
908 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
909 $formfile = new FormFile($db);
910
911 // Show list of available documents
912 $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
913 $urlsource .= str_replace('&amp;', '&', $param);
914
915 $filedir = $diroutputmassaction;
916 $genallowed = $permissiontoread;
917 $delallowed = $permissiontoadd;
918
919 print $formfile->showdocuments('massfilesarea_recruitment', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
920}
921
922// End of page
923llxFooter();
924$db->close();
$id
Definition account.php:48
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
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.
Definition wrapper.php:71
Class to manage standard extra fields.
Class to generate html code for admin pages.
Class to offer components to list and upload files.
Class to manage generation of HTML components Only common components must be here.
Class to manage projects.
Class for RecruitmentCandidature.
Class for RecruitmentJobPosition.
llxFooter()
Footer empty.
Definition document.php:107
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)
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_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
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.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
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...
dol_now($mode='auto')
Return date for now.
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...
newToken()
Return the value of token currently saved into session with name 'newtoken'.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
dolGetButtonTitleSeparator($moreClass="")
Add space between dolGetButtonTitle.
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.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
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...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
recruitmentjobpositionPrepareHead($object)
Prepare array of tabs for RecruitmentJobPosition.
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.