32 require
'../main.inc.php';
33 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
36 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
40 $langs->loadLangs(array(
"members",
"companies",
"categories"));
44 $action =
GETPOST(
'action',
'aZ09');
45 $massaction =
GETPOST(
'massaction',
'alpha');
46 $show_files =
GETPOST(
'show_files',
'int');
47 $confirm =
GETPOST(
'confirm',
'alpha');
48 $cancel =
GETPOST(
'cancel',
'alpha');
49 $toselect =
GETPOST(
'toselect',
'array');
50 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'memberslist';
51 $backtopage =
GETPOST(
'backtopage',
'alpha');
52 $optioncss =
GETPOST(
'optioncss',
'aZ');
53 $mode =
GETPOST(
'mode',
'alpha');
56 $search =
GETPOST(
"search",
'alpha');
57 $search_ref =
GETPOST(
"search_ref",
'alpha');
58 $search_lastname =
GETPOST(
"search_lastname",
'alpha');
59 $search_firstname =
GETPOST(
"search_firstname",
'alpha');
60 $search_gender =
GETPOST(
"search_gender",
'alpha');
61 $search_civility =
GETPOST(
"search_civility",
'alpha');
62 $search_company =
GETPOST(
'search_company',
'alphanohtml');
63 $search_login =
GETPOST(
"search_login",
'alpha');
64 $search_address =
GETPOST(
"search_address",
'alpha');
65 $search_zip =
GETPOST(
"search_zip",
'alpha');
66 $search_town =
GETPOST(
"search_town",
'alpha');
67 $search_state =
GETPOST(
"search_state",
'alpha');
68 $search_country =
GETPOST(
"search_country",
'alpha');
69 $search_phone =
GETPOST(
"search_phone",
'alpha');
70 $search_phone_perso =
GETPOST(
"search_phone_perso",
'alpha');
71 $search_phone_mobile =
GETPOST(
"search_phone_mobile",
'alpha');
72 $search_type =
GETPOST(
"search_type",
'alpha');
73 $search_email =
GETPOST(
"search_email",
'alpha');
74 $search_categ =
GETPOST(
"search_categ",
'int');
75 $search_morphy =
GETPOST(
"search_morphy",
'alpha');
76 $search_import_key = trim(
GETPOST(
"search_import_key",
'alpha'));
78 $catid =
GETPOST(
"catid",
'int');
79 $socid =
GETPOST(
'socid',
'int');
81 $search_filter =
GETPOST(
"search_filter",
'alpha');
82 $search_status =
GETPOST(
"search_status",
'intcomma');
84 $filter =
GETPOST(
"filter",
'alpha');
86 $search_filter = $filter;
89 $statut =
GETPOST(
"statut",
'alpha');
91 $search_status = $statut;
94 $sall = trim((
GETPOST(
'search_all',
'alphanohtml') !=
'') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml'));
96 if ($search_status < -2) {
101 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
102 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
103 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
105 if (empty($page) || $page == -1) {
108 $offset = $limit * $page;
109 $pageprev = $page - 1;
110 $pagenext = $page + 1;
112 $sortorder = ($filter ==
'outofdate' ?
"DESC" :
"ASC");
115 $sortfield = ($filter ==
'outofdate' ?
"d.datefin" :
"d.lastname");
121 $hookmanager->initHooks(array(
'memberlist'));
125 $extrafields->fetch_name_optionals_label($object->table_element);
127 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
130 $fieldstosearchall = array(
133 'd.lastname'=>
'Lastname',
134 'd.firstname'=>
'Firstname',
135 'd.societe'=>
"Company",
137 'd.address'=>
'Address',
141 'd.phone_perso'=>
"PhonePerso",
142 'd.phone_mobile'=>
"PhoneMobile",
143 'd.note_public'=>
'NotePublic',
144 'd.note_private'=>
'NotePrivate',
146 if ($db->type ==
'pgsql') {
147 unset($fieldstosearchall[
'd.rowid']);
150 $arrayfields = array(
151 'd.ref'=>array(
'label'=>
"Ref",
'checked'=>1),
152 'd.civility'=>array(
'label'=>
"Civility",
'checked'=>0),
153 'd.lastname'=>array(
'label'=>
"Lastname",
'checked'=>1),
154 'd.firstname'=>array(
'label'=>
"Firstname",
'checked'=>1),
155 'd.gender'=>array(
'label'=>
"Gender",
'checked'=>0),
156 'd.company'=>array(
'label'=>
"Company",
'checked'=>1),
157 'd.login'=>array(
'label'=>
"Login",
'checked'=>1),
158 'd.morphy'=>array(
'label'=>
"MemberNature",
'checked'=>1),
159 't.libelle'=>array(
'label'=>
"Type",
'checked'=>1),
160 'd.email'=>array(
'label'=>
"Email",
'checked'=>1),
161 'd.address'=>array(
'label'=>
"Address",
'checked'=>0),
162 'd.zip'=>array(
'label'=>
"Zip",
'checked'=>0),
163 'd.town'=>array(
'label'=>
"Town",
'checked'=>0),
164 'd.phone'=>array(
'label'=>
"Phone",
'checked'=>0),
165 'd.phone_perso'=>array(
'label'=>
"PhonePerso",
'checked'=>0),
166 'd.phone_mobile'=>array(
'label'=>
"PhoneMobile",
'checked'=>0),
167 'state.nom'=>array(
'label'=>
"State",
'checked'=>0),
168 'country.code_iso'=>array(
'label'=>
"Country",
'checked'=>0),
171 'd.datefin'=>array(
'label'=>
"EndSubscription",
'checked'=>1,
'position'=>500),
172 'd.datec'=>array(
'label'=>
"DateCreation",
'checked'=>0,
'position'=>500),
173 'd.birth'=>array(
'label'=>
"Birthday",
'checked'=>0,
'position'=>500),
174 'd.tms'=>array(
'label'=>
"DateModificationShort",
'checked'=>0,
'position'=>500),
175 'd.statut'=>array(
'label'=>
"Status",
'checked'=>1,
'position'=>1000),
176 'd.import_key'=>array(
'label'=>
"ImportId",
'checked'=>0,
'position'=>1100),
180 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
190 if (
GETPOST(
'cancel',
'alpha')) {
191 $action =
'list'; $massaction =
'';
193 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
197 $parameters = array(
'socid'=>isset($socid) ? $socid :
null);
198 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
203 if (empty($reshook)) {
205 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
208 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
214 $search_lastname =
"";
215 $search_firstname =
"";
217 $search_civility =
"";
219 $search_company =
"";
222 $search_address =
"";
226 $search_country =
'';
228 $search_phone_perso =
'';
229 $search_phone_mobile =
'';
234 $search_import_key =
'';
238 $search_array_options = array();
242 if ($massaction ==
'close' && $user->hasRight(
'adherent',
'creer')) {
249 foreach ($toselect as $idtoclose) {
250 $tmpmember->fetch($idtoclose);
251 $result = $tmpmember->resiliate($user);
253 if ($result < 0 && !count($tmpmember->errors)) {
272 if ($massaction ==
'createexternaluser' && $user->hasRight(
'adherent',
'creer') && $user->hasRight(
'user',
'user',
'creer')) {
279 foreach ($toselect as $idtoclose) {
280 $tmpmember->fetch($idtoclose);
282 if (!empty($tmpmember->fk_soc)) {
283 $nuser =
new User($db);
286 $result = $nuser->create_from_member($tmpuser, $tmpmember->login);
288 if ($result < 0 && !count($tmpmember->errors)) {
299 setEventMessages($langs->trans(
"XExternalUserCreated", $nbcreated),
null,
'mesgs');
308 $objectclass =
'Adherent';
309 $objectlabel =
'Members';
310 $permissiontoread = $user->hasRight(
'adherent',
'lire');
311 $permissiontodelete = $user->hasRight(
'adherent',
'supprimer');
312 $permissiontoadd = $user->hasRight(
'adherent',
'creer');
313 $uploaddir = $conf->adherent->dir_output;
314 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
328 $title = $langs->trans(
"Members").
" - ".$langs->trans(
"List");
329 $help_url =
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
335 if ((!empty($search_categ) && $search_categ > 0) || !empty($catid)) {
336 $sql =
"SELECT DISTINCT";
340 $sql .=
" d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,";
341 $sql .=
" d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
342 $sql .=
" d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,";
343 $sql .=
" d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
344 $sql .=
" d.note_private, d.note_public, d.import_key,";
346 $sql .=
" ".$db->ifsql(
"d.societe IS NULL",
"s.nom",
"d.societe").
" as companyname,";
347 $sql .=
" t.libelle as type, t.subscription,";
348 $sql .=
" state.code_departement as state_code, state.nom as state_name,";
351 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
352 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
353 $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
"ef.".$key.
" as options_".$key.
', ' :
'');
358 $parameters = array();
359 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters);
360 $sql .= preg_replace(
'/^,/',
'', $hookmanager->resPrint);
361 $sql = preg_replace(
'/,\s*$/',
'',
$sql);
366 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent as d";
367 if (!empty($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) {
368 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (d.rowid = ef.fk_object)";
370 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as country on (country.rowid = d.country)";
371 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_departements as state on (state.rowid = d.state_id)";
372 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe as s on (s.rowid = d.fk_soc)";
375 $sql .=
", ".MAIN_DB_PREFIX.
"adherent_type as t";
376 $sql .=
" WHERE d.fk_adherent_type = t.rowid";
378 if ($catid && empty($search_categ)) {
379 $search_categ = $catid;
382 $searchCategoryContactList = $search_categ ? array($search_categ) : array();
383 $searchCategoryContactOperator = 0;
385 if (!empty($searchCategoryContactList)) {
386 $searchCategoryContactSqlList = array();
387 $listofcategoryid =
'';
388 foreach ($searchCategoryContactList as $searchCategoryContact) {
389 if (intval($searchCategoryContact) == -2) {
390 $searchCategoryContactSqlList[] =
"NOT EXISTS (SELECT ck.fk_categorie FROM ".MAIN_DB_PREFIX.
"categorie_member as ck WHERE d.rowid = ck.fk_member)";
391 } elseif (intval($searchCategoryContact) > 0) {
392 if ($searchCategoryContactOperator == 0) {
393 $searchCategoryContactSqlList[] =
" EXISTS (SELECT ck.fk_categorie FROM ".MAIN_DB_PREFIX.
"categorie_member as ck WHERE d.rowid = ck.fk_member AND ck.fk_categorie = ".((int) $searchCategoryContact).
")";
395 $listofcategoryid .= ($listofcategoryid ?
', ' :
'') .((
int) $searchCategoryContact);
399 if ($listofcategoryid) {
400 $searchCategoryContactSqlList[] =
" EXISTS (SELECT ck.fk_categorie FROM ".MAIN_DB_PREFIX.
"categorie_member as ck WHERE d.rowid = ck.fk_member AND ck.fk_categorie IN (".$db->sanitize($listofcategoryid).
"))";
402 if ($searchCategoryContactOperator == 1) {
403 if (!empty($searchCategoryContactSqlList)) {
404 $sql .=
" AND (".implode(
' OR ', $searchCategoryContactSqlList).
")";
407 if (!empty($searchCategoryContactSqlList)) {
408 $sql .=
" AND (".implode(
' AND ', $searchCategoryContactSqlList).
")";
413 $sql .=
" AND d.entity IN (".getEntity(
'adherent').
")";
417 if ($search_type > 0) {
418 $sql .=
" AND t.rowid=".((int) $search_type);
420 if ($search_filter ==
'withoutsubscription') {
421 $sql .=
" AND (datefin IS NULL)";
423 if ($search_filter ==
'waitingsubscription') {
424 $sql .=
" AND (datefin IS NULL AND t.subscription = '1')";
426 if ($search_filter ==
'uptodate') {
427 $sql .=
" AND (datefin >= '".$db->idate($now).
"' OR t.subscription = '0')";
429 if ($search_filter ==
'outofdate') {
430 $sql .=
" AND (datefin < '".$db->idate($now).
"' AND t.subscription = '1')";
432 if ($search_status !=
'') {
434 $sql .=
" AND d.statut in (".$db->sanitize($db->escape($search_status)).
")";
436 if ($search_morphy !=
'' && $search_morphy !=
'-1') {
442 if ($search_civility) {
445 if ($search_firstname) {
448 if ($search_lastname) {
449 $sql .=
natural_search(array(
"d.firstname",
"d.lastname",
"d.societe"), $search_lastname);
451 if ($search_gender !=
'' && $search_gender !=
'-1') {
457 if ($search_company) {
463 if ($search_address) {
478 if ($search_phone_perso) {
481 if ($search_phone_mobile) {
484 if ($search_country) {
485 $sql .=
" AND d.country IN (".$db->sanitize($search_country).
')';
487 if ($search_import_key) {
492 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
495 $parameters = array();
496 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
497 $sql .= $hookmanager->resPrint;
501 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
503 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords',
$sql);
504 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
505 $resql = $db->query($sqlforcount);
507 $objforcount = $db->fetch_object($resql);
521 $sql .= $db->order($sortfield, $sortorder);
523 $sql .= $db->plimit($limit + 1, $offset);
526 $resql = $db->query(
$sql);
532 $num = $db->num_rows($resql);
535 $arrayofselected = is_array($toselect) ? $toselect : array();
537 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) {
538 $obj = $db->fetch_object($resql);
540 header(
"Location: ".DOL_URL_ROOT.
'/adherents/card.php?id='.$id);
545 if ($search_type > 0) {
547 $result = $membertype->fetch($search_type);
548 $title .=
" (".$membertype->label.
")";
554 $param .=
'&mode='.urlencode($mode);
556 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
557 $param .=
'&contextpage='.urlencode($contextpage);
559 if ($limit > 0 && $limit != $conf->liste_limit) {
560 $param .=
'&limit='.urlencode($limit);
563 $param .=
"&sall=".urlencode($sall);
566 $param .=
"&search_ref=".urlencode($search_ref);
568 if ($search_civility) {
569 $param .=
"&search_civility=".urlencode($search_civility);
571 if ($search_firstname) {
572 $param .=
"&search_firstname=".urlencode($search_firstname);
574 if ($search_lastname) {
575 $param .=
"&search_lastname=".urlencode($search_lastname);
577 if ($search_gender) {
578 $param .=
"&search_gender=".urlencode($search_gender);
581 $param .=
"&search_login=".urlencode($search_login);
584 $param .=
"&search_email=".urlencode($search_email);
586 if ($search_categ > 0 || $search_categ == -2) {
587 $param .=
"&search_categ=".urlencode($search_categ);
589 if ($search_company) {
590 $param .=
"&search_company=".urlencode($search_company);
592 if ($search_address !=
'') {
593 $param .=
"&search_address=".urlencode($search_address);
595 if ($search_town !=
'') {
596 $param .=
"&search_town=".urlencode($search_town);
598 if ($search_zip !=
'') {
599 $param .=
"&search_zip=".urlencode($search_zip);
601 if ($search_state !=
'') {
602 $param .=
"&search_state=".urlencode($search_state);
604 if ($search_country !=
'') {
605 $param .=
"&search_country=".urlencode($search_country);
607 if ($search_phone !=
'') {
608 $param .=
"&search_phone=".urlencode($search_phone);
610 if ($search_phone_perso !=
'') {
611 $param .=
"&search_phone_perso=".urlencode($search_phone_perso);
613 if ($search_phone_mobile !=
'') {
614 $param .=
"&search_phone_mobile=".urlencode($search_phone_mobile);
616 if ($search_filter && $search_filter !=
'-1') {
617 $param .=
"&search_filter=".urlencode($search_filter);
619 if ($search_status !=
"" && $search_status != -3) {
620 $param .=
"&search_status=".urlencode($search_status);
622 if ($search_import_key !=
'') {
623 $param .=
'&search_import_key='.urlencode($search_import_key);
625 if ($search_type > 0) {
626 $param .=
"&search_type=".urlencode($search_type);
628 if ($optioncss !=
'') {
629 $param .=
'&optioncss='.urlencode($optioncss);
633 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
636 $arrayofmassactions = array(
640 if ($user->hasRight(
'adherent',
'creer')) {
641 $arrayofmassactions[
'close'] =
img_picto(
'',
'close_title',
'class="pictofixedwidth"').$langs->trans(
"Resiliate");
643 if ($user->hasRight(
'adherent',
'supprimer')) {
644 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
646 if (
isModEnabled(
'category') && $user->hasRight(
'adherent',
'creer')) {
647 $arrayofmassactions[
'preaffecttag'] =
img_picto(
'',
'category',
'class="pictofixedwidth"').$langs->trans(
"AffectTag");
649 if ($user->hasRight(
'adherent',
'creer') && $user->hasRight(
'user',
'user',
'creer')) {
650 $arrayofmassactions[
'createexternaluser'] =
img_picto(
'',
'user',
'class="pictofixedwidth"').$langs->trans(
"CreateExternalUser");
652 if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete',
'preaffecttag'))) {
653 $arrayofmassactions = array();
655 $massactionbutton =
$form->selectMassAction(
'', $arrayofmassactions);
658 $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'));
659 $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'));
660 if ($user->hasRight(
'adherent',
'creer')) {
661 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewMember'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/adherents/card.php?action=create');
664 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
665 if ($optioncss !=
'') {
666 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
668 print
'<input type="hidden" name="token" value="'.newToken().
'">';
669 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
670 print
'<input type="hidden" name="action" value="list">';
671 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
672 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
673 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
674 print
'<input type="hidden" name="mode" value="'.$mode.
'">';
677 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num,
$nbtotalofrecords, $object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
679 $topicmail =
"Information";
680 $modelmail =
"member";
682 $trackid =
'mem'.$object->id;
683 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
686 foreach ($fieldstosearchall as $key => $val) {
687 $fieldstosearchall[$key] = $langs->trans($val);
689 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $sall).join(
', ', $fieldstosearchall).
'</div>';
694 if (
isModEnabled(
'categorie') && $user->hasRight(
'categorie',
'lire')) {
695 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
696 $moreforfilter .=
'<div class="divsearchfield">';
697 $moreforfilter .=
img_picto($langs->trans(
'Categories'),
'category',
'class="pictofixedlength"').$formother->select_categories(Categorie::TYPE_MEMBER, $search_categ,
'search_categ', 1, $langs->trans(
"MembersCategoriesShort"));
698 $moreforfilter .=
'</div>';
700 $parameters = array();
701 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters);
702 if (empty($reshook)) {
703 $moreforfilter .= $hookmanager->resPrint;
705 $moreforfilter = $hookmanager->resPrint;
707 if (!empty($moreforfilter)) {
708 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
709 print $moreforfilter;
713 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
714 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN',
''));
715 if ($massactionbutton) {
716 $selectedfields .=
$form->showCheckAddButtons(
'checkforselect', 1);
719 print
'<div class="div-table-responsive">';
720 print
'<table class="tagtable liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
723 print
'<tr class="liste_titre_filter">';
726 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
727 print
'<td class="liste_titre middle">';
728 $searchpicto =
$form->showFilterButtons(
'left');
734 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
735 print
'<td class="liste_titre"> </td>';
739 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
740 print
'<td class="liste_titre">';
741 print
'<input class="flat maxwidth75imp" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
746 if (!empty($arrayfields[
'd.civility'][
'checked'])) {
747 print
'<td class="liste_titre left">';
748 print
'<input class="flat maxwidth50imp" type="text" name="search_civility" value="'.dol_escape_htmltag($search_civility).
'"></td>';
752 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
753 print
'<td class="liste_titre left">';
754 print
'<input class="flat maxwidth75imp" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).
'"></td>';
758 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
759 print
'<td class="liste_titre left">';
760 print
'<input class="flat maxwidth75imp" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).
'"></td>';
764 if (!empty($arrayfields[
'd.gender'][
'checked'])) {
765 print
'<td class="liste_titre">';
766 $arraygender = array(
'man'=>$langs->trans(
"Genderman"),
'woman'=>$langs->trans(
"Genderwoman"),
'other'=>$langs->trans(
"Genderother"));
767 print
$form->selectarray(
'search_gender', $arraygender, $search_gender, 1);
772 if (!empty($arrayfields[
'd.company'][
'checked'])) {
773 print
'<td class="liste_titre left">';
774 print
'<input class="flat maxwidth75imp" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).
'"></td>';
778 if (!empty($arrayfields[
'd.login'][
'checked'])) {
779 print
'<td class="liste_titre left">';
780 print
'<input class="flat maxwidth75imp" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).
'"></td>';
784 if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
785 print
'<td class="liste_titre center">';
786 $arraymorphy = array(
'mor'=>$langs->trans(
"Moral"),
'phy'=>$langs->trans(
"Physical"));
787 print
$form->selectarray(
'search_morphy', $arraymorphy, $search_morphy, 1, 0, 0,
'', 0, 0, 0,
'',
'maxwidth100');
792 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
795 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
796 print
'<td class="liste_titre">';
797 $listetype = $membertypestatic->liste_array();
798 print
$form->selectarray(
"search_type", $listetype, $search_type, 1, 0, 0,
'', 0, 32);
803 if (!empty($arrayfields[
'd.address'][
'checked'])) {
804 print
'<td class="liste_titre left">';
805 print
'<input class="flat maxwidth75imp" type="text" name="search_address" value="'.dol_escape_htmltag($search_address).
'"></td>';
809 if (!empty($arrayfields[
'd.zip'][
'checked'])) {
810 print
'<td class="liste_titre left">';
811 print
'<input class="flat maxwidth50imp" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).
'"></td>';
815 if (!empty($arrayfields[
'd.town'][
'checked'])) {
816 print
'<td class="liste_titre left">';
817 print
'<input class="flat maxwidth75imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).
'"></td>';
821 if (!empty($arrayfields[
'state.nom'][
'checked'])) {
822 print
'<td class="liste_titre">';
823 print
'<input class="flat searchstring maxwidth75imp" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).
'">';
828 if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
829 print
'<td class="liste_titre center">';
830 print
$form->select_country($search_country,
'search_country',
'', 0,
'minwidth100imp maxwidth100');
835 if (!empty($arrayfields[
'd.phone'][
'checked'])) {
836 print
'<td class="liste_titre left">';
837 print
'<input class="flat maxwidth75imp" type="text" name="search_phone" value="'.dol_escape_htmltag($search_phone).
'"></td>';
841 if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
842 print
'<td class="liste_titre left">';
843 print
'<input class="flat maxwidth75imp" type="text" name="search_phone_perso" value="'.dol_escape_htmltag($search_phone_perso).
'"></td>';
847 if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
848 print
'<td class="liste_titre left">';
849 print
'<input class="flat maxwidth75imp" type="text" name="search_phone_mobile" value="'.dol_escape_htmltag($search_phone_mobile).
'"></td>';
853 if (!empty($arrayfields[
'd.email'][
'checked'])) {
854 print
'<td class="liste_titre left">';
855 print
'<input class="flat maxwidth75imp" type="text" name="search_email" value="'.dol_escape_htmltag($search_email).
'"></td>';
859 if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
860 print
'<td class="liste_titre center">';
862 $selectarray = array(
'-1'=>
'',
'waitingsubscription'=>$langs->trans(
"WaitingSubscription"),
'uptodate'=>$langs->trans(
"UpToDate"),
'outofdate'=>$langs->trans(
"OutOfDate"));
863 print
$form->selectarray(
'search_filter', $selectarray, $search_filter);
868 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
871 $parameters = array(
'arrayfields'=>$arrayfields);
872 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
873 print $hookmanager->resPrint;
876 if (!empty($arrayfields[
'd.datec'][
'checked'])) {
877 print
'<td class="liste_titre">';
882 if (!empty($arrayfields[
'd.birth'][
'checked'])) {
883 print
'<td class="liste_titre">';
888 if (!empty($arrayfields[
'd.tms'][
'checked'])) {
889 print
'<td class="liste_titre">';
894 if (!empty($arrayfields[
'd.statut'][
'checked'])) {
895 print
'<td class="liste_titre right parentonrightofpage">';
902 print
$form->selectarray(
'search_status', $liststatus, $search_status, -3, 0, 0,
'', 0, 0, 0,
'',
'search_status width100 onrightofpage');
907 if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
908 print
'<td class="liste_titre center">';
909 print
'<input class="flat searchstring maxwidth50" type="text" name="search_import_key" value="'.dol_escape_htmltag($search_import_key).
'">';
913 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
915 print
'<td class="liste_titre middle">';
916 $searchpicto =
$form->showFilterButtons();
922 print
'<tr class="liste_titre">';
923 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
924 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch actioncolumn ');
926 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
929 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
930 print_liste_field_titre($arrayfields[
'd.ref'][
'label'], $_SERVER[
"PHP_SELF"],
'd.ref',
'', $param,
'', $sortfield, $sortorder);
932 if (!empty($arrayfields[
'd.civility'][
'checked'])) {
933 print_liste_field_titre($arrayfields[
'd.civility'][
'label'], $_SERVER[
"PHP_SELF"],
'd.civility',
'', $param,
'', $sortfield, $sortorder);
935 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
936 print_liste_field_titre($arrayfields[
'd.firstname'][
'label'], $_SERVER[
"PHP_SELF"],
'd.firstname',
'', $param,
'', $sortfield, $sortorder);
938 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
939 print_liste_field_titre($arrayfields[
'd.lastname'][
'label'], $_SERVER[
"PHP_SELF"],
'd.lastname',
'', $param,
'', $sortfield, $sortorder);
941 if (!empty($arrayfields[
'd.gender'][
'checked'])) {
942 print_liste_field_titre($arrayfields[
'd.gender'][
'label'], $_SERVER[
'PHP_SELF'],
'd.gender', $param,
"",
"", $sortfield, $sortorder);
944 if (!empty($arrayfields[
'd.company'][
'checked'])) {
945 print_liste_field_titre($arrayfields[
'd.company'][
'label'], $_SERVER[
"PHP_SELF"],
'companyname',
'', $param,
'', $sortfield, $sortorder);
947 if (!empty($arrayfields[
'd.login'][
'checked'])) {
948 print_liste_field_titre($arrayfields[
'd.login'][
'label'], $_SERVER[
"PHP_SELF"],
'd.login',
'', $param,
'', $sortfield, $sortorder);
950 if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
951 print_liste_field_titre($arrayfields[
'd.morphy'][
'label'], $_SERVER[
"PHP_SELF"],
'd.morphy',
'', $param,
'', $sortfield, $sortorder);
953 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
954 print_liste_field_titre($arrayfields[
't.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
't.libelle',
'', $param,
'', $sortfield, $sortorder);
956 if (!empty($arrayfields[
'd.address'][
'checked'])) {
957 print_liste_field_titre($arrayfields[
'd.address'][
'label'], $_SERVER[
"PHP_SELF"],
'd.address',
'', $param,
'', $sortfield, $sortorder);
959 if (!empty($arrayfields[
'd.zip'][
'checked'])) {
960 print_liste_field_titre($arrayfields[
'd.zip'][
'label'], $_SERVER[
"PHP_SELF"],
'd.zip',
'', $param,
'', $sortfield, $sortorder);
962 if (!empty($arrayfields[
'd.town'][
'checked'])) {
963 print_liste_field_titre($arrayfields[
'd.town'][
'label'], $_SERVER[
"PHP_SELF"],
'd.town',
'', $param,
'', $sortfield, $sortorder);
965 if (!empty($arrayfields[
'state.nom'][
'checked'])) {
966 print_liste_field_titre($arrayfields[
'state.nom'][
'label'], $_SERVER[
"PHP_SELF"],
"state.nom",
"", $param,
'', $sortfield, $sortorder);
968 if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
969 print_liste_field_titre($arrayfields[
'country.code_iso'][
'label'], $_SERVER[
"PHP_SELF"],
"country.code_iso",
"", $param,
'', $sortfield, $sortorder,
'center ');
971 if (!empty($arrayfields[
'd.phone'][
'checked'])) {
972 print_liste_field_titre($arrayfields[
'd.phone'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone',
'', $param,
'', $sortfield, $sortorder);
974 if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
975 print_liste_field_titre($arrayfields[
'd.phone_perso'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone_perso',
'', $param,
'', $sortfield, $sortorder);
977 if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
978 print_liste_field_titre($arrayfields[
'd.phone_mobile'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone_mobile',
'', $param,
'', $sortfield, $sortorder);
980 if (!empty($arrayfields[
'd.email'][
'checked'])) {
981 print_liste_field_titre($arrayfields[
'd.email'][
'label'], $_SERVER[
"PHP_SELF"],
'd.email',
'', $param,
'', $sortfield, $sortorder);
983 if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
984 print_liste_field_titre($arrayfields[
'd.datefin'][
'label'], $_SERVER[
"PHP_SELF"],
'd.datefin,t.subscription',
'', $param,
'', $sortfield, $sortorder,
'center ');
987 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
990 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
991 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
992 print $hookmanager->resPrint;
994 if (!empty($arrayfields[
'd.datec'][
'checked'])) {
995 print_liste_field_titre($arrayfields[
'd.datec'][
'label'], $_SERVER[
"PHP_SELF"],
"d.datec",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
997 if (!empty($arrayfields[
'd.birth'][
'checked'])) {
998 print_liste_field_titre($arrayfields[
'd.birth'][
'label'], $_SERVER[
"PHP_SELF"],
"d.birth",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
1000 if (!empty($arrayfields[
'd.tms'][
'checked'])) {
1001 print_liste_field_titre($arrayfields[
'd.tms'][
'label'], $_SERVER[
"PHP_SELF"],
"d.tms",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
1003 if (!empty($arrayfields[
'd.statut'][
'checked'])) {
1004 print_liste_field_titre($arrayfields[
'd.statut'][
'label'], $_SERVER[
"PHP_SELF"],
"d.statut,t.subscription,d.datefin",
"", $param,
'class="right"', $sortfield, $sortorder);
1006 if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
1007 print_liste_field_titre($arrayfields[
'd.import_key'][
'label'], $_SERVER[
"PHP_SELF"],
"d.import_key",
"", $param,
'', $sortfield, $sortorder,
'center ');
1009 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
1010 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
1015 $totalarray = array();
1016 $totalarray[
'nbfield'] = 0;
1017 while ($i < min($num, $limit)) {
1018 $obj = $db->fetch_object($resql);
1020 $datefin = $db->jdate($obj->datefin);
1022 $memberstatic->id = $obj->rowid;
1023 $memberstatic->ref = $obj->ref;
1024 $memberstatic->civility_id = $obj->civility;
1025 $memberstatic->login = $obj->login;
1026 $memberstatic->lastname = $obj->lastname;
1027 $memberstatic->firstname = $obj->firstname;
1028 $memberstatic->gender = $obj->gender;
1029 $memberstatic->statut = $obj->statut;
1030 $memberstatic->datefin = $datefin;
1031 $memberstatic->socid = $obj->fk_soc;
1032 $memberstatic->photo = $obj->photo;
1033 $memberstatic->email = $obj->email;
1034 $memberstatic->morphy = $obj->morphy;
1035 $memberstatic->note_public = $obj->note_public;
1036 $memberstatic->note_private = $obj->note_private;
1037 $memberstatic->need_subscription = $obj->subscription;
1039 if (!empty($obj->fk_soc)) {
1040 $memberstatic->fetch_thirdparty();
1041 if ($memberstatic->thirdparty->id > 0) {
1042 $companyname = $memberstatic->thirdparty->name;
1043 $companynametoshow = $memberstatic->thirdparty->getNomUrl(1);
1046 $companyname = $obj->company;
1047 $companynametoshow = $obj->company;
1049 $memberstatic->company = $companyname;
1051 if ($mode ==
'kanban') {
1053 print
'<tr><td colspan="12">';
1054 print
'<div class="box-flex-container kanban">';
1056 $membertypestatic->id = $obj->type_id;
1057 $membertypestatic->label = $obj->type;
1058 $memberstatic->type = $membertypestatic->label;
1059 $memberstatic->photo = $obj->photo;
1061 print $memberstatic->getKanbanView(
'');
1062 if ($i == (min($num, $limit) - 1)) {
1067 print
'<tr class="oddeven">';
1070 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
1071 print
'<td class="center">';
1072 if ($massactionbutton || $massaction) {
1074 if (in_array($obj->rowid, $arrayofselected)) {
1077 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1082 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
1083 print
'<td class="center" data-key="id">'.$obj->rowid.
'</td>';
1085 $totalarray[
'nbfield']++;
1089 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
1091 print $memberstatic->getNomUrl(-1, 0,
'card',
'ref',
'', -1, 0, 1);
1094 $totalarray[
'nbfield']++;
1098 if (!empty($arrayfields[
'd.civility'][
'checked'])) {
1100 print $obj->civility;
1103 $totalarray[
'nbfield']++;
1107 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
1108 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).
'">';
1109 print $memberstatic->getNomUrl(0, 0,
'card',
'firstname');
1113 $totalarray[
'nbfield']++;
1117 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
1118 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->lastname).
'">';
1119 print $memberstatic->getNomUrl(0, 0,
'card',
'lastname');
1123 $totalarray[
'nbfield']++;
1127 if (!empty($arrayfields[
'd.gender'][
'checked'])) {
1130 print $langs->trans(
"Gender".$obj->gender);
1134 $totalarray[
'nbfield']++;
1138 if (!empty($arrayfields[
'd.company'][
'checked'])) {
1139 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($companyname).
'">';
1140 print $companynametoshow;
1144 if (!empty($arrayfields[
'd.login'][
'checked'])) {
1145 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->login).
'">'.$obj->login.
"</td>\n";
1147 $totalarray[
'nbfield']++;
1151 if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
1152 print
'<td class="center">';
1153 print $memberstatic->getmorphylib(
'', 2);
1156 $totalarray[
'nbfield']++;
1160 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
1161 $membertypestatic->id = $obj->type_id;
1162 $membertypestatic->label = $obj->type;
1163 print
'<td class="nowraponall">';
1164 print $membertypestatic->getNomUrl(1, 32);
1167 $totalarray[
'nbfield']++;
1171 if (!empty($arrayfields[
'd.address'][
'checked'])) {
1172 print
'<td class="nocellnopadd tdoverflowmax200" title="'.dol_escape_htmltag($obj->address).
'">';
1173 print $obj->address;
1176 $totalarray[
'nbfield']++;
1180 if (!empty($arrayfields[
'd.zip'][
'checked'])) {
1181 print
'<td class="nocellnopadd">';
1185 $totalarray[
'nbfield']++;
1189 if (!empty($arrayfields[
'd.town'][
'checked'])) {
1190 print
'<td class="nocellnopadd">';
1194 $totalarray[
'nbfield']++;
1198 if (!empty($arrayfields[
'state.nom'][
'checked'])) {
1199 print
"<td>".$obj->state_name.
"</td>\n";
1201 $totalarray[
'nbfield']++;
1205 if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
1206 $tmparray =
getCountry($obj->country,
'all');
1207 print
'<td class="center tdoverflowmax100" title="'.dol_escape_htmltag($tmparray[
'label']).
'">';
1211 $totalarray[
'nbfield']++;
1215 if (!empty($arrayfields[
'd.phone'][
'checked'])) {
1216 print
'<td class="nocellnopadd">';
1220 $totalarray[
'nbfield']++;
1224 if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
1225 print
'<td class="nocellnopadd">';
1226 print $obj->phone_perso;
1229 $totalarray[
'nbfield']++;
1233 if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
1234 print
'<td class="nocellnopadd">';
1235 print $obj->phone_mobile;
1238 $totalarray[
'nbfield']++;
1242 if (!empty($arrayfields[
'd.email'][
'checked'])) {
1243 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->email).
'">';
1248 $datefin = $db->jdate($obj->datefin);
1249 if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
1250 print
'<td class="nowrap center">';
1253 if ($memberstatic->hasDelay()) {
1254 $textlate =
' ('.$langs->trans(
"DateReference").
' > '.$langs->trans(
"DateToday").
' '.(ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24) >= 0 ?
'+' :
'').ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24).
' '.$langs->trans(
"days").
')';
1255 print
" ".img_warning($langs->trans(
"SubscriptionLate").$textlate);
1258 if (!empty($obj->subscription)) {
1259 print
'<span class="opacitymedium">'.$langs->trans(
"SubscriptionNotReceived").
'</span>';
1260 if ($obj->statut > 0) {
1261 print
" ".img_warning();
1270 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1272 $parameters = array(
'arrayfields'=>$arrayfields,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
1273 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
1274 print $hookmanager->resPrint;
1276 if (!empty($arrayfields[
'd.datec'][
'checked'])) {
1277 print
'<td class="nowrap center">';
1278 print
dol_print_date($db->jdate($obj->date_creation),
'dayhour',
'tzuser');
1281 $totalarray[
'nbfield']++;
1285 if (!empty($arrayfields[
'd.birth'][
'checked'])) {
1286 print
'<td class="nowrap center">';
1290 $totalarray[
'nbfield']++;
1294 if (!empty($arrayfields[
'd.tms'][
'checked'])) {
1295 print
'<td class="nowrap center">';
1296 print
dol_print_date($db->jdate($obj->date_update),
'dayhour',
'tzuser');
1299 $totalarray[
'nbfield']++;
1303 if (!empty($arrayfields[
'd.statut'][
'checked'])) {
1304 print
'<td class="nowrap right">';
1305 print $memberstatic->LibStatut($obj->statut, $obj->subscription, $datefin, 5);
1308 $totalarray[
'nbfield']++;
1311 if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
1312 print
'<td class="tdoverflowmax100 center" title="'.dol_escape_htmltag($obj->import_key).
'">';
1316 $totalarray[
'nbfield']++;
1320 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
1321 print
'<td class="center">';
1322 if ($massactionbutton || $massaction) {
1324 if (in_array($obj->rowid, $arrayofselected)) {
1327 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1332 $totalarray[
'nbfield']++;
1341 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1347 foreach ($arrayfields as $key => $val) {
1348 if (!empty($val[
'checked'])) {
1352 print
'<tr><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</td></tr>';
1357 $parameters = array(
'sql' =>
$sql);
1358 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters);
1359 print $hookmanager->resPrint;