28 require
'../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
30 if (!empty($conf->categorie->enabled)) {
31 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
35 $langs->loadLangs(array(
'users',
'companies',
'hrm',
'salaries'));
37 $action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
38 $massaction =
GETPOST(
'massaction',
'alpha');
39 $show_files =
GETPOST(
'show_files',
'int');
40 $confirm =
GETPOST(
'confirm',
'alpha');
41 $cancel =
GETPOST(
'cancel',
'alpha');
42 $toselect =
GETPOST(
'toselect',
'array');
43 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'userlist';
44 $backtopage =
GETPOST(
'backtopage',
'alpha');
45 $optioncss =
GETPOST(
'optioncss',
'aZ');
49 if ($user->socid > 0) {
50 $socid = $user->socid;
54 $mode =
GETPOST(
"mode",
'alpha');
57 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
58 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
59 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
61 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
65 $offset = $limit * $page;
66 $pageprev = $page - 1;
67 $pagenext = $page + 1;
70 $object =
new User($db);
72 $diroutputmassaction = $conf->user->dir_output.
'/temp/massgeneration/'.$user->id;
73 $hookmanager->initHooks(array(
'userlist'));
76 $extrafields->fetch_name_optionals_label($object->table_element);
78 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
81 $sortfield =
"u.login";
88 $search_all =
GETPOST(
'search_all',
'alphanohtml') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml');
90 foreach ($object->fields as $key => $val) {
91 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
92 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
94 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
95 $search[$key.
'_dtstart'] =
dol_mktime(0, 0, 0,
GETPOST(
'search_'.$key.
'_dtstartmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtstartday',
'int'),
GETPOST(
'search_'.$key.
'_dtstartyear',
'int'));
96 $search[$key.
'_dtend'] =
dol_mktime(23, 59, 59,
GETPOST(
'search_'.$key.
'_dtendmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtendday',
'int'),
GETPOST(
'search_'.$key.
'_dtendyear',
'int'));
100 $userstatic =
new User($db);
101 $companystatic =
new Societe($db);
105 $fieldstosearchall = array(
107 'u.lastname'=>
"Lastname",
108 'u.firstname'=>
"Firstname",
109 'u.accountancy_code'=>
"AccountancyCode",
110 'u.office_phone'=>
"PhonePro",
111 'u.user_mobile'=>
"PhoneMobile",
115 if (!empty($conf->api->enabled)) {
116 $fieldstosearchall[
'u.api_key'] =
"ApiKey";
120 $arrayfields = array(
121 'u.login'=>array(
'label'=>
"Login",
'checked'=>1,
'position'=>10),
122 'u.lastname'=>array(
'label'=>
"Lastname",
'checked'=>1,
'position'=>15),
123 'u.firstname'=>array(
'label'=>
"Firstname",
'checked'=>1,
'position'=>20),
124 'u.entity'=>array(
'label'=>
"Entity",
'checked'=>1,
'position'=>50,
'enabled'=>(!empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))),
125 'u.gender'=>array(
'label'=>
"Gender",
'checked'=>0,
'position'=>22),
126 'u.employee'=>array(
'label'=>
"Employee",
'checked'=>($mode ==
'employee' ? 1 : 0),
'position'=>25),
127 'u.fk_user'=>array(
'label'=>
"HierarchicalResponsible",
'checked'=>1,
'position'=>27),
128 'u.accountancy_code'=>array(
'label'=>
"AccountancyCode",
'checked'=>0,
'position'=>30),
129 'u.office_phone'=>array(
'label'=>
"PhonePro",
'checked'=>1,
'position'=>31),
130 'u.user_mobile'=>array(
'label'=>
"PhoneMobile",
'checked'=>1,
'position'=>32),
131 'u.email'=>array(
'label'=>
"EMail",
'checked'=>1,
'position'=>35),
132 'u.api_key'=>array(
'label'=>
"ApiKey",
'checked'=>0,
'position'=>40,
"enabled"=>(!empty($conf->api->enabled) && $user->admin)),
133 'u.fk_soc'=>array(
'label'=>
"Company",
'checked'=>($contextpage ==
'employeelist' ? 0 : 1),
'position'=>45),
134 'u.salary'=>array(
'label'=>
"Salary",
'checked'=>1,
'position'=>80,
'enabled'=>(!empty($conf->salaries->enabled) && !empty($user->rights->salaries->readall))),
135 'u.datelastlogin'=>array(
'label'=>
"LastConnexion",
'checked'=>1,
'position'=>100),
136 'u.datepreviouslogin'=>array(
'label'=>
"PreviousConnexion",
'checked'=>0,
'position'=>110),
137 'u.datec'=>array(
'label'=>
"DateCreation",
'checked'=>0,
'position'=>500),
138 'u.tms'=>array(
'label'=>
"DateModificationShort",
'checked'=>0,
'position'=>500),
139 'u.statut'=>array(
'label'=>
"Status",
'checked'=>1,
'position'=>1000),
142 include DOL_DOCUMENT_ROOT .
'/core/tpl/extrafields_list_array_fields.tpl.php';
148 $sall = trim((
GETPOST(
'search_all',
'alphanohtml') !=
'') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml'));
149 $search_user =
GETPOST(
'search_user',
'alpha');
150 $search_login =
GETPOST(
'search_login',
'alpha');
151 $search_lastname =
GETPOST(
'search_lastname',
'alpha');
152 $search_firstname =
GETPOST(
'search_firstname',
'alpha');
153 $search_gender =
GETPOST(
'search_gender',
'alpha');
154 $search_employee =
GETPOST(
'search_employee',
'alpha');
155 $search_accountancy_code =
GETPOST(
'search_accountancy_code',
'alpha');
156 $search_phonepro =
GETPOST(
'search_phonepro',
'alpha');
157 $search_phonemobile =
GETPOST(
'search_phonemobile',
'alpha');
158 $search_email =
GETPOST(
'search_email',
'alpha');
159 $search_api_key =
GETPOST(
'search_api_key',
'alphanohtml');
160 $search_statut =
GETPOST(
'search_statut',
'intcomma');
161 $search_thirdparty =
GETPOST(
'search_thirdparty',
'alpha');
162 $search_warehouse =
GETPOST(
'search_warehouse',
'alpha');
163 $search_supervisor =
GETPOST(
'search_supervisor',
'intcomma');
164 $optioncss =
GETPOST(
'optioncss',
'alpha');
165 $search_categ =
GETPOST(
"search_categ",
'int');
166 $catid =
GETPOST(
'catid',
'int');
169 if ($search_statut ==
'') {
170 $search_statut =
'1';
172 if ($mode ==
'employee' && !
GETPOSTISSET(
'search_employee')) {
173 $search_employee = 1;
177 $permissiontoadd = (!empty($user->admin) || $user->rights->user->user->creer);
178 $canreaduser = (!empty($user->admin) || $user->rights->user->user->lire);
179 $canedituser = (!empty($user->admin) || $user->rights->user->user->creer);
180 $candisableuser = (!empty($user->admin) || $user->rights->user->user->supprimer);
181 $canreadgroup = $canreaduser;
182 $caneditgroup = $canedituser;
183 if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
184 $canreadgroup = (!empty($user->admin) || $user->rights->user->group_advance->read);
185 $caneditgroup = (!empty($user->admin) || $user->rights->user->group_advance->write);
191 if ($mode ==
'employee') {
192 if (empty($user->rights->salaries->read)) {
196 if (empty($user->rights->user->user->lire) && empty($user->admin)) {
201 $childids = $user->getAllChildIds(1);
208 if (
GETPOST(
'cancel',
'alpha')) {
212 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
216 $parameters = array();
217 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
222 if (empty($reshook)) {
224 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
227 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
230 $search_lastname =
"";
231 $search_firstname =
"";
233 $search_employee =
"";
234 $search_accountancy_code =
"";
235 $search_phonepro =
"";
236 $search_phonemobile =
"";
239 $search_thirdparty =
"";
240 $search_warehouse =
"";
241 $search_supervisor =
"";
242 $search_api_key =
"";
243 $search_datelastlogin =
"";
244 $search_datepreviouslogin =
"";
245 $search_date_creation =
"";
246 $search_date_update =
"";
249 $search_array_options = array();
251 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
252 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
257 $objectclass =
'User';
258 $objectlabel =
'User';
259 $uploaddir = $conf->user->dir_output;
260 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
263 if (!$error && ($massaction ==
'disable' || $massaction ==
'reactivate') && $permissiontoadd) {
264 $objecttmp =
new User($db);
270 foreach ($toselect as $toselectid) {
271 if ($toselectid == $user->id) {
272 setEventMessages($langs->trans($massaction == 0 ?
'CantDisableYourself' :
'CanEnableYourself'),
null,
'errors');
277 $result = $objecttmp->fetch($toselectid);
279 if ($objecttmp->admin) {
280 setEventMessages($langs->trans($massaction == 0 ?
'CantDisableAnAdminUserWithMassActions' :
'CantEnableAnAdminUserWithMassActions', $objecttmp->login),
null,
'errors');
285 $result = $objecttmp->setstatus($massaction ==
'disable' ? 0 : 1);
288 } elseif ($result < 0) {
302 if (!$error && !empty($conf->file->main_limit_users)) {
303 $nb = $object->getNbOfUsers(
"active");
304 if ($nb >= $conf->file->main_limit_users) {
306 setEventMessages($langs->trans(
"YourQuotaOfUsersIsReached"),
null,
'errors');
330 $user2 =
new User($db);
334 $help_url =
'EN:Module_Users|FR:Module_Utilisateurs|ES:Módulo_Usuarios|DE:Modul_Benutzer';
335 if ($contextpage ==
'employeelist' && $search_employee == 1) {
336 $title = $langs->trans(
"Employees");
338 $title = $langs->trans(
"Users");
346 $sql =
"SELECT DISTINCT u.rowid, u.lastname, u.firstname, u.admin, u.fk_soc, u.login, u.office_phone, u.user_mobile, u.email, u.api_key, u.accountancy_code, u.gender, u.employee, u.photo,";
347 $sql .=
" u.fk_user,";
348 $sql .=
" u.salary, u.datelastlogin, u.datepreviouslogin,";
349 $sql .=
" u.ldap_sid, u.statut as status, u.entity,";
350 $sql .=
" u.tms as date_update, u.datec as date_creation,";
351 $sql .=
" u2.rowid as id2, u2.login as login2, u2.firstname as firstname2, u2.lastname as lastname2, u2.admin as admin2, u2.fk_soc as fk_soc2, u2.office_phone as ofice_phone2, u2.user_mobile as user_mobile2, u2.email as email2, u2.gender as gender2, u2.photo as photo2, u2.entity as entity2, u2.statut as status2,";
352 $sql .=
" s.nom as name, s.canvas";
354 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
355 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
356 $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
360 $parameters = array();
361 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
362 $sql .= preg_replace(
'/^,/',
'', $hookmanager->resPrint);
363 $sql = preg_replace(
'/,\s*$/',
'', $sql);
364 $sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as u";
365 if (isset($extrafields->attributes[$object->table_element][
'label']) && is_array($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) {
366 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (u.rowid = ef.fk_object)";
368 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe as s ON u.fk_soc = s.rowid";
369 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"user as u2 ON u.fk_user = u2.rowid";
370 if (!empty($search_categ) || !empty($catid)) {
371 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
"categorie_user as cu ON u.rowid = cu.fk_user";
374 $parameters = array();
375 $reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object);
376 $sql .= $hookmanager->resPrint;
378 $sql .= $hookmanager->resPrint;
380 $sql .=
" WHERE u.entity IN (".getEntity($object->element).
")";
382 $sql .=
" AND u.fk_soc = ".((int) $socid);
385 if ($search_supervisor > 0) {
386 $sql .=
" AND u.fk_user IN (".$db->sanitize($search_supervisor).
")";
388 if ($search_thirdparty !=
'') {
391 if ($search_warehouse > 0) {
392 $sql .=
natural_search(array(
'u.fk_warehouse'), $search_warehouse);
394 if ($search_login !=
'') {
397 if ($search_lastname !=
'') {
400 if ($search_firstname !=
'') {
403 if ($search_gender !=
'' && $search_gender !=
'-1') {
404 $sql .=
" AND u.gender = '".$db->escape($search_gender).
"'";
406 if (is_numeric($search_employee) && $search_employee >= 0) {
407 $sql .=
' AND u.employee = '.(int) $search_employee;
409 if ($search_accountancy_code !=
'') {
410 $sql .=
natural_search(
"u.accountancy_code", $search_accountancy_code);
412 if ($search_phonepro !=
'') {
415 if ($search_phonemobile !=
'') {
418 if ($search_email !=
'') {
421 if ($search_api_key !=
'') {
424 if ($search_statut !=
'' && $search_statut >= 0) {
425 $sql .=
" AND u.statut IN (".$db->sanitize($search_statut).
")";
431 $sql .=
" AND cu.fk_categorie = ".((int) $catid);
434 $sql .=
" AND cu.fk_categorie IS NULL";
436 if ($search_categ > 0) {
437 $sql .=
" AND cu.fk_categorie = ".((int) $search_categ);
439 if ($search_categ == -2) {
440 $sql .=
" AND cu.fk_categorie IS NULL";
442 if ($search_warehouse > 0) {
443 $sql .=
" AND u.fk_warehouse = ".((int) $search_warehouse);
445 if ($mode ==
'employee' && empty($user->rights->salaries->readall)) {
446 $sql .=
" AND u.rowid IN (".$db->sanitize(join(
',', $childids)).
")";
449 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
451 $parameters = array();
452 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
453 $sql .= $hookmanager->resPrint;
456 $nbtotalofrecords =
'';
457 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
472 $sqlforcount = preg_replace(
'/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/',
'SELECT COUNT(*) as nbtotalofrecords FROM', $sql);
473 $resql = $db->query($sqlforcount);
475 $objforcount = $db->fetch_object(
$resql);
476 $nbtotalofrecords = $objforcount->nbtotalofrecords;
481 if (($page * $limit) > $nbtotalofrecords) {
489 $sql .= $db->order($sortfield, $sortorder);
491 $sql .= $db->plimit($limit + 1, $offset);
494 $resql = $db->query($sql);
500 $num = $db->num_rows(
$resql);
503 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) {
504 $obj = $db->fetch_object(
$resql);
506 header(
"Location: ".DOL_URL_ROOT.
'/user/card.php?id='.$id);
515 $arrayofselected = is_array($toselect) ? $toselect : array();
519 $param .=
'&mode='.urlencode($mode);
521 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
522 $param .=
'&contextpage='.urlencode($contextpage);
524 if ($limit > 0 && $limit != $conf->liste_limit) {
525 $param .=
'&limit='.urlencode($limit);
528 $param .=
'&sall='.urlencode($sall);
530 if ($search_user !=
'') {
531 $param .=
"&search_user=".urlencode($search_user);
533 if ($search_login !=
'') {
534 $param .=
"&search_login=".urlencode($search_login);
536 if ($search_lastname !=
'') {
537 $param .=
"&search_lastname=".urlencode($search_lastname);
539 if ($search_firstname !=
'') {
540 $param .=
"&search_firstname=".urlencode($search_firstname);
542 if ($search_gender !=
'' && $search_gender !=
'-1') {
543 $param .=
"&search_gender=".urlencode($search_gender);
545 if ($search_employee !=
'' && $search_employee !=
'-1') {
546 $param .=
"&search_employee=".urlencode($search_employee);
548 if ($search_accountancy_code !=
'') {
549 $param .=
"&search_accountancy_code=".urlencode($search_accountancy_code);
551 if ($search_phonepro !=
'') {
552 $param .=
"&search_phonepro=".urlencode($search_phonepro);
554 if ($search_phonemobile !=
'') {
555 $param .=
"&search_phonemobile=".urlencode($search_phonemobile);
557 if ($search_email !=
'') {
558 $param .=
"&search_email=".urlencode($search_email);
560 if ($search_api_key !=
'') {
561 $param .=
"&search_api_key=".urlencode($search_api_key);
563 if ($search_supervisor > 0) {
564 $param .=
"&search_supervisor=".urlencode($search_supervisor);
566 if ($search_statut !=
'') {
567 $param .=
"&search_statut=".urlencode($search_statut);
569 if ($optioncss !=
'') {
570 $param .=
'&optioncss='.urlencode($optioncss);
572 if ($search_categ > 0) {
573 $param .=
'&search_categ='.urlencode($search_categ);
575 if ($search_warehouse > 0) {
576 $param .=
'&search_warehouse='.urlencode($search_warehouse);
579 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
582 $arrayofmassactions = array();
583 if ($permissiontoadd) {
584 $arrayofmassactions[
'disable'] =
img_picto(
'',
'close_title',
'class="pictofixedwidth"').$langs->trans(
"DisableUser");
586 if ($permissiontoadd) {
587 $arrayofmassactions[
'reactivate'] =
img_picto(
'',
'check',
'class="pictofixedwidth"').$langs->trans(
"Reactivate");
590 $arrayofmassactions[
'preaffecttag'] =
img_picto(
'',
'category',
'class="pictofixedwidth"').$langs->trans(
"AffectTag");
594 if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete',
'preaffecttag'))) {
595 $arrayofmassactions = array();
597 $massactionbutton =
$form->selectMassAction(
'', $arrayofmassactions);
599 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
600 if ($optioncss !=
'') {
601 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
603 print
'<input type="hidden" name="token" value="'.newToken().
'">';
604 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
605 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
606 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
607 print
'<input type="hidden" name="page" value="'.$page.
'">';
608 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
609 print
'<input type="hidden" name="mode" value="'.$mode.
'">';
611 $url = DOL_URL_ROOT.
'/user/card.php?action=create'.($mode ==
'employee' ?
'&employee=1' :
'').
'&leftmenu=';
612 if (!empty($socid)) {
613 $url .=
'&socid='.urlencode($socid);
617 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'ViewList'),
'',
'fa fa-bars paddingleft imgforviewmode', DOL_URL_ROOT.
'/user/list.php?mode=common'.preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ((empty($mode) || $mode ==
'common') ? 2 : 1), array(
'morecss'=>
'reposition'));
618 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'HierarchicView'),
'',
'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.
'/user/hierarchy.php?mode=hierarchy'.preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', (($mode ==
'hierarchy') ? 2 : 1), array(
'morecss'=>
'reposition'));
619 $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'));
621 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewUser'),
'',
'fa fa-plus-circle', $url,
'', $permissiontoadd);
628 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'user', 0, $morehtmlright.
' '.$newcardbutton,
'', $limit, 0, 0, 1);
633 $topicmail =
"SendUserRef";
635 $objecttmp =
new User($db);
636 $trackid =
'use'.$object->id;
637 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
639 if (!empty($catid)) {
640 print
"<div id='ways'>";
642 $ways = $c->print_all_ways(
' > ',
'user/list.php');
643 print
" > ".$ways[0].
"<br>\n";
648 foreach ($fieldstosearchall as $key => $val) {
649 $fieldstosearchall[$key] = $langs->trans($val);
651 print
'<!-- Search done like if USER_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
652 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>';
661 if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
662 $moreforfilter .=
'<div class="divsearchfield">';
663 $tmptitle = $langs->trans(
'Category');
664 $moreforfilter .=
img_picto($langs->trans(
"Category"),
'category',
'class="pictofixedwidth"').$formother->select_categories(Categorie::TYPE_USER, $search_categ,
'search_categ', 1, $tmptitle);
665 $moreforfilter .=
'</div>';
668 if (!empty($conf->stock->enabled) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) {
669 require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
671 $moreforfilter .=
'<div class="divsearchfield">';
672 $tmptitle = $langs->trans(
'Warehouse');
673 $moreforfilter .=
img_picto($tmptitle,
'stock',
'class="pictofixedwidth"').$formproduct->selectWarehouses($search_warehouse,
'search_warehouse',
'', $tmptitle, 0, 0, $tmptitle);
674 $moreforfilter .=
'</div>';
677 $parameters = array();
678 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object);
679 if (empty($reshook)) {
680 $moreforfilter .= $hookmanager->resPrint;
682 $moreforfilter = $hookmanager->resPrint;
685 if (!empty($moreforfilter)) {
686 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
687 print $moreforfilter;
691 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
692 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN',
''));
693 $selectedfields .= (count($arrayofmassactions) ?
$form->showCheckAddButtons(
'checkforselect', 1) :
'');
695 print
'<div class="div-table-responsive">';
696 print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
700 print
'<tr class="liste_titre">';
702 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
703 print
'<td class="liste_titre maxwidthsearch">';
704 $searchpicto =
$form->showFilterButtons(
'left');
708 if (!empty($arrayfields[
'u.login'][
'checked'])) {
709 print
'<td class="liste_titre"><input type="text" name="search_login" class="maxwidth50" value="'.$search_login.
'"></td>';
711 if (!empty($arrayfields[
'u.lastname'][
'checked'])) {
712 print
'<td class="liste_titre"><input type="text" name="search_lastname" class="maxwidth50" value="'.$search_lastname.
'"></td>';
714 if (!empty($arrayfields[
'u.firstname'][
'checked'])) {
715 print
'<td class="liste_titre"><input type="text" name="search_firstname" class="maxwidth50" value="'.$search_firstname.
'"></td>';
717 if (!empty($arrayfields[
'u.gender'][
'checked'])) {
718 print
'<td class="liste_titre center">';
719 $arraygender = array(
'man'=>$langs->trans(
"Genderman"),
'woman'=>$langs->trans(
"Genderwoman"),
'other'=>$langs->trans(
"Genderother"));
720 print
$form->selectarray(
'search_gender', $arraygender, $search_gender, 1);
723 if (!empty($arrayfields[
'u.employee'][
'checked'])) {
724 print
'<td class="liste_titre">';
725 print
$form->selectyesno(
'search_employee', $search_employee, 1,
false, 1);
729 if (!empty($arrayfields[
'u.fk_user'][
'checked'])) {
730 print
'<td class="liste_titre">';
731 print
$form->select_dolusers($search_supervisor,
'search_supervisor', 1, array(), 0,
'', 0, 0, 0, 0,
'', 0,
'',
'maxwidth150');
734 if (!empty($arrayfields[
'u.accountancy_code'][
'checked'])) {
735 print
'<td class="liste_titre"><input type="text" name="search_accountancy_code" class="maxwidth50" value="'.$search_accountancy_code.
'"></td>';
737 if (!empty($arrayfields[
'u.office_phone'][
'checked'])) {
738 print
'<td class="liste_titre"><input type="text" name="search_phonepro" class="maxwidth50" value="'.$search_phonepro.
'"></td>';
740 if (!empty($arrayfields[
'u.user_mobile'][
'checked'])) {
741 print
'<td class="liste_titre"><input type="text" name="search_phonemobile" class="maxwidth50" value="'.$search_phonemobile.
'"></td>';
743 if (!empty($arrayfields[
'u.email'][
'checked'])) {
744 print
'<td class="liste_titre"><input type="text" name="search_email" class="maxwidth75" value="'.$search_email.
'"></td>';
746 if (!empty($arrayfields[
'u.api_key'][
'checked'])) {
747 print
'<td class="liste_titre"><input type="text" name="search_api_key" class="maxwidth50" value="'.$search_api_key.
'"></td>';
749 if (!empty($arrayfields[
'u.fk_soc'][
'checked'])) {
750 print
'<td class="liste_titre"><input type="text" name="search_thirdparty" class="maxwidth75" value="'.$search_thirdparty.
'"></td>';
752 if (!empty($arrayfields[
'u.entity'][
'checked'])) {
753 print
'<td class="liste_titre"></td>';
755 if (!empty($arrayfields[
'u.salary'][
'checked'])) {
756 print
'<td class="liste_titre"></td>';
758 if (!empty($arrayfields[
'u.datelastlogin'][
'checked'])) {
759 print
'<td class="liste_titre"></td>';
761 if (!empty($arrayfields[
'u.datepreviouslogin'][
'checked'])) {
762 print
'<td class="liste_titre"></td>';
765 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
767 $parameters = array(
'arrayfields'=>$arrayfields);
768 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object);
769 print $hookmanager->resPrint;
770 if (!empty($arrayfields[
'u.datec'][
'checked'])) {
772 print
'<td class="liste_titre">';
775 if (!empty($arrayfields[
'u.tms'][
'checked'])) {
777 print
'<td class="liste_titre">';
780 if (!empty($arrayfields[
'u.statut'][
'checked'])) {
782 print
'<td class="liste_titre center">';
783 print
$form->selectarray(
'search_statut', array(
'-1'=>
'',
'0'=>$langs->trans(
'Disabled'),
'1'=>$langs->trans(
'Enabled')), $search_statut, 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth75imp');
787 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
788 print
'<td class="liste_titre maxwidthsearch">';
789 $searchpicto =
$form->showFilterButtons();
795 $totalarray = array();
796 $totalarray[
'nbfield'] = 0;
800 print
'<tr class="liste_titre">';
801 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
802 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
803 $totalarray[
'nbfield']++;
805 if (!empty($arrayfields[
'u.login'][
'checked'])) {
807 $totalarray[
'nbfield']++;
809 if (!empty($arrayfields[
'u.lastname'][
'checked'])) {
810 print_liste_field_titre(
"Lastname", $_SERVER[
'PHP_SELF'],
"u.lastname", $param,
"",
"", $sortfield, $sortorder);
811 $totalarray[
'nbfield']++;
813 if (!empty($arrayfields[
'u.firstname'][
'checked'])) {
814 print_liste_field_titre(
"FirstName", $_SERVER[
'PHP_SELF'],
"u.firstname", $param,
"",
"", $sortfield, $sortorder);
815 $totalarray[
'nbfield']++;
817 if (!empty($arrayfields[
'u.gender'][
'checked'])) {
818 print_liste_field_titre(
"Gender", $_SERVER[
'PHP_SELF'],
"u.gender", $param,
"",
"", $sortfield, $sortorder,
'center ');
819 $totalarray[
'nbfield']++;
821 if (!empty($arrayfields[
'u.employee'][
'checked'])) {
822 print_liste_field_titre(
"Employee", $_SERVER[
'PHP_SELF'],
"u.employee", $param,
"",
"", $sortfield, $sortorder,
'center ');
823 $totalarray[
'nbfield']++;
825 if (!empty($arrayfields[
'u.fk_user'][
'checked'])) {
826 print_liste_field_titre(
"HierarchicalResponsible", $_SERVER[
'PHP_SELF'],
"u.fk_user", $param,
"",
"", $sortfield, $sortorder);
827 $totalarray[
'nbfield']++;
829 if (!empty($arrayfields[
'u.accountancy_code'][
'checked'])) {
830 print_liste_field_titre(
"AccountancyCode", $_SERVER[
'PHP_SELF'],
"u.accountancy_code", $param,
"",
"", $sortfield, $sortorder);
831 $totalarray[
'nbfield']++;
833 if (!empty($arrayfields[
'u.office_phone'][
'checked'])) {
834 print_liste_field_titre(
"PhonePro", $_SERVER[
'PHP_SELF'],
"u.office_phone", $param,
"",
"", $sortfield, $sortorder);
835 $totalarray[
'nbfield']++;
837 if (!empty($arrayfields[
'u.user_mobile'][
'checked'])) {
838 print_liste_field_titre(
"PhoneMobile", $_SERVER[
'PHP_SELF'],
"u.user_mobile", $param,
"",
"", $sortfield, $sortorder);
839 $totalarray[
'nbfield']++;
841 if (!empty($arrayfields[
'u.email'][
'checked'])) {
843 $totalarray[
'nbfield']++;
845 if (!empty($arrayfields[
'u.api_key'][
'checked'])) {
847 $totalarray[
'nbfield']++;
849 if (!empty($arrayfields[
'u.fk_soc'][
'checked'])) {
851 $totalarray[
'nbfield']++;
853 if (!empty($arrayfields[
'u.entity'][
'checked'])) {
855 $totalarray[
'nbfield']++;
857 if (!empty($arrayfields[
'u.salary'][
'checked'])) {
858 print_liste_field_titre(
"Salary", $_SERVER[
'PHP_SELF'],
"u.salary", $param,
"",
"", $sortfield, $sortorder,
'right ');
859 $totalarray[
'nbfield']++;
861 if (!empty($arrayfields[
'u.datelastlogin'][
'checked'])) {
862 print_liste_field_titre(
"LastConnexion", $_SERVER[
'PHP_SELF'],
"u.datelastlogin", $param,
"",
'', $sortfield, $sortorder,
'center ');
863 $totalarray[
'nbfield']++;
865 if (!empty($arrayfields[
'u.datepreviouslogin'][
'checked'])) {
866 print_liste_field_titre(
"PreviousConnexion", $_SERVER[
'PHP_SELF'],
"u.datepreviouslogin", $param,
"",
'', $sortfield, $sortorder,
'center ');
867 $totalarray[
'nbfield']++;
870 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
872 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder,
'totalarray'=>&$totalarray);
873 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object);
874 print $hookmanager->resPrint;
875 if (!empty($arrayfields[
'u.datec'][
'checked'])) {
876 print_liste_field_titre(
"DateCreationShort", $_SERVER[
"PHP_SELF"],
"u.datec",
"", $param,
'', $sortfield, $sortorder,
'center nowrap ');
877 $totalarray[
'nbfield']++;
879 if (!empty($arrayfields[
'u.tms'][
'checked'])) {
880 print_liste_field_titre(
"DateModificationShort", $_SERVER[
"PHP_SELF"],
"u.tms",
"", $param,
'', $sortfield, $sortorder,
'center nowrap ');
881 $totalarray[
'nbfield']++;
883 if (!empty($arrayfields[
'u.statut'][
'checked'])) {
884 print_liste_field_titre(
"Status", $_SERVER[
"PHP_SELF"],
"u.statut",
"", $param,
'', $sortfield, $sortorder,
'center ');
885 $totalarray[
'nbfield']++;
888 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
889 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
890 $totalarray[
'nbfield']++;
896 $needToFetchEachLine = 0;
897 if (isset($extrafields->attributes[$object->table_element][
'computed']) && is_array($extrafields->attributes[$object->table_element][
'computed']) && count($extrafields->attributes[$object->table_element][
'computed']) > 0) {
898 foreach ($extrafields->attributes[$object->table_element][
'computed'] as $key => $val) {
899 if (preg_match(
'/\$object/', $val)) {
900 $needToFetchEachLine++;
909 $savnbfield = $totalarray[
'nbfield'];
910 $totalarray[
'nbfield'] = 0;
911 $imaxinloop = ($limit ? min($num, $limit) : $num);
912 while ($i < $imaxinloop) {
913 $obj = $db->fetch_object(
$resql);
918 if (empty($obj->country_code)) $obj->country_code =
'';
921 $object->setVarsFromFetchObj($obj);
923 $object->id = $obj->rowid;
924 $object->admin = $obj->admin;
925 $object->ref = $obj->rowid;
926 $object->login = $obj->login;
927 $object->statut = $obj->status;
928 $object->status = $obj->status;
929 $object->office_phone = $obj->office_phone;
930 $object->user_mobile = $obj->user_mobile;
931 $object->email = $obj->email;
932 $object->gender = $obj->gender;
933 $object->socid = $obj->fk_soc;
934 $object->firstname = $obj->firstname;
935 $object->lastname = $obj->lastname;
936 $object->employee = $obj->employee;
937 $object->photo = $obj->photo;
939 $li = $object->getNomUrl(-1,
'', 0, 0, 24, 1,
'login',
'', 1);
942 if ((!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read) && in_array($obj->rowid, $childids))
943 || (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->readall))
944 || (!empty($conf->hrm->enabled) && !empty($user->rights->hrm->employee->read))) {
947 $canreadsecretapi = 0;
948 if ($user->id == $obj->rowid || !empty($user->admin)) {
949 $canreadsecretapi = 1;
952 if ($mode ==
'kanban') {
954 print
'<tr><td colspan="'.$savnbfield.
'">';
955 print
'<div class="box-flex-container">';
959 print $object->getKanbanView(
'');
960 if ($i == ($imaxinloop - 1)) {
967 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
969 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
970 print
'<td class="nowrap center">';
971 if ($massactionbutton || $massaction) {
973 if (in_array($object->id, $arrayofselected)) {
976 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
981 if (!empty($arrayfields[
'u.login'][
'checked'])) {
982 print
'<td class="nowraponall tdoverflowmax150">';
984 if (!empty($conf->multicompany->enabled) && $obj->admin && !$obj->entity) {
985 print
img_picto($langs->trans(
"SuperAdministrator"),
'redstar',
'class="valignmiddle paddingleft"');
986 } elseif ($obj->admin) {
987 print
img_picto($langs->trans(
"Administrator"),
'star',
'class="valignmiddle paddingleft"');
991 $totalarray[
'nbfield']++;
994 if (!empty($arrayfields[
'u.lastname'][
'checked'])) {
995 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->lastname).
'">'.
dol_escape_htmltag($obj->lastname).
'</td>';
997 $totalarray[
'nbfield']++;
1000 if (!empty($arrayfields[
'u.firstname'][
'checked'])) {
1001 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->lastname).
'">'.
dol_escape_htmltag($obj->firstname).
'</td>';
1003 $totalarray[
'nbfield']++;
1006 if (!empty($arrayfields[
'u.gender'][
'checked'])) {
1007 print
'<td class="center">';
1011 switch ($obj->gender) {
1013 $addgendertxt .=
'<i class="fas fa-mars" title="'.dol_escape_htmltag($langs->trans(
"Gender".$obj->gender)).
'"></i>';
1016 $addgendertxt .=
'<i class="fas fa-venus" title="'.dol_escape_htmltag($langs->trans(
"Gender".$obj->gender)).
'"></i>';
1019 $addgendertxt .=
'<i class="fas fa-transgender" title="'.dol_escape_htmltag($langs->trans(
"Gender".$obj->gender)).
'"></i>';
1022 print $addgendertxt;
1027 $totalarray[
'nbfield']++;
1031 if (!empty($arrayfields[
'u.employee'][
'checked'])) {
1032 print
'<td class="center">'.yn($obj->employee).
'</td>';
1034 $totalarray[
'nbfield']++;
1039 if (!empty($arrayfields[
'u.fk_user'][
'checked'])) {
1041 print
'<td class="nowrap">';
1043 $user2->id = $obj->id2;
1044 $user2->login = $obj->login2;
1045 $user2->lastname = $obj->lastname2;
1046 $user2->firstname = $obj->firstname2;
1047 $user2->gender = $obj->gender2;
1048 $user2->photo = $obj->photo2;
1049 $user2->admin = $obj->admin2;
1050 $user2->office_phone = $obj->office_phone;
1051 $user2->user_mobile = $obj->user_mobile;
1052 $user2->email = $obj->email2;
1053 $user2->socid = $obj->fk_soc2;
1054 $user2->statut = $obj->status2;
1055 $user2->status = $obj->status2;
1056 print $user2->getNomUrl(-1,
'', 0, 0, 24, 0,
'',
'', 1);
1057 if (!empty($conf->multicompany->enabled) && $obj->admin2 && !$obj->entity2) {
1058 print
img_picto($langs->trans(
"SuperAdministrator"),
'redstar',
'class="valignmiddle paddingleft"');
1059 } elseif ($obj->admin2) {
1060 print
img_picto($langs->trans(
"Administrator"),
'star',
'class="valignmiddle paddingleft"');
1065 $totalarray[
'nbfield']++;
1069 if (!empty($arrayfields[
'u.accountancy_code'][
'checked'])) {
1070 print
'<td>'.$obj->accountancy_code.
'</td>';
1072 $totalarray[
'nbfield']++;
1077 if (!empty($arrayfields[
'u.office_phone'][
'checked'])) {
1078 print
'<td class="tdoverflowmax125">'.dol_print_phone($obj->office_phone, $obj->country_code, 0, $obj->rowid,
'AC_TEL',
' ',
'phone').
"</td>\n";
1080 $totalarray[
'nbfield']++;
1083 if (!empty($arrayfields[
'u.user_mobile'][
'checked'])) {
1084 print
'<td class="tdoverflowmax125">'.dol_print_phone($obj->user_mobile, $obj->country_code, 0, $obj->rowid,
'AC_TEL',
' ',
'mobile').
"</td>\n";
1086 $totalarray[
'nbfield']++;
1089 if (!empty($arrayfields[
'u.email'][
'checked'])) {
1090 print
'<td class="tdoverflowmax150">'.dol_print_email($obj->email, $obj->rowid, $obj->fk_soc,
'AC_EMAIL', 0, 0, 1).
"</td>\n";
1092 $totalarray[
'nbfield']++;
1095 if (!empty($arrayfields[
'u.api_key'][
'checked'])) {
1096 print
'<td class="tdoverflowmax125" title="'.dol_escape_htmltag($obj->api_key).
'">';
1097 if ($obj->api_key) {
1098 if ($canreadsecretapi) {
1101 print
'<span class="opacitymedium">'.$langs->trans(
"Hidden").
'</span>';
1106 $totalarray[
'nbfield']++;
1109 if (!empty($arrayfields[
'u.fk_soc'][
'checked'])) {
1110 print
'<td class="tdoverflowmax150">';
1111 if ($obj->fk_soc > 0) {
1112 $companystatic->id = $obj->fk_soc;
1113 $companystatic->name = $obj->name;
1114 $companystatic->canvas = $obj->canvas;
1115 print $companystatic->getNomUrl(1);
1116 } elseif ($obj->ldap_sid) {
1117 print
'<span class="opacitymedium">'.$langs->trans(
"DomainUser").
'</span>';
1119 print
'<span class="opacitymedium">'.$langs->trans(
"InternalUser").
'</span>';
1123 $totalarray[
'nbfield']++;
1127 if (!empty($conf->multicompany->enabled) && is_object($mc) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
1128 if (!empty($arrayfields[
'u.entity'][
'checked'])) {
1130 if (!$obj->entity) {
1131 print $langs->trans(
"AllEntities");
1133 $mc->getInfo($obj->entity);
1138 $totalarray[
'nbfield']++;
1144 if (!empty($arrayfields[
'u.salary'][
'checked'])) {
1145 print
'<td class="nowraponall right amount">';
1147 if ($canreadhrmdata) {
1148 print
price($obj->salary);
1150 print
'<span class="opacitymedium">'.$langs->trans(
"Hidden").
'</span>';
1155 $totalarray[
'nbfield']++;
1160 if (!empty($arrayfields[
'u.datelastlogin'][
'checked'])) {
1161 print
'<td class="nowrap center">'.dol_print_date($db->jdate($obj->datelastlogin),
"dayhour").
'</td>';
1163 $totalarray[
'nbfield']++;
1167 if (!empty($arrayfields[
'u.datepreviouslogin'][
'checked'])) {
1168 print
'<td class="nowrap center">'.dol_print_date($db->jdate($obj->datepreviouslogin),
"dayhour").
'</td>';
1170 $totalarray[
'nbfield']++;
1175 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1177 $parameters = array(
'arrayfields'=>$arrayfields,
'object'=>$object,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
1178 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object);
1179 print $hookmanager->resPrint;
1181 if (!empty($arrayfields[
'u.datec'][
'checked'])) {
1182 print
'<td class="center">';
1183 print
dol_print_date($db->jdate($obj->date_creation),
'dayhour',
'tzuser');
1186 $totalarray[
'nbfield']++;
1190 if (!empty($arrayfields[
'u.tms'][
'checked'])) {
1191 print
'<td class="center">';
1192 print
dol_print_date($db->jdate($obj->date_update),
'dayhour',
'tzuser');
1195 $totalarray[
'nbfield']++;
1199 if (!empty($arrayfields[
'u.statut'][
'checked'])) {
1200 print
'<td class="center">'.$object->getLibStatut(5).
'</td>';
1202 $totalarray[
'nbfield']++;
1206 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
1207 print
'<td class="nowrap center">';
1208 if ($massactionbutton || $massaction) {
1210 if (in_array($object->id, $arrayofselected)) {
1213 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1218 $totalarray[
'nbfield']++;
1228 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1233 foreach ($arrayfields as $key => $val) {
1234 if (!empty($val[
'checked'])) {
1238 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
1244 $parameters = array(
'arrayfields'=>$arrayfields,
'sql'=>$sql);
1245 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
1246 print $hookmanager->resPrint;
1248 print
'</table>'.
"\n";
1249 print
'</div>'.
"\n";
1251 print
'</form>'.
"\n";