32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
36require_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$search_all = trim((
GETPOST(
'search_all',
'alphanohtml') !=
'') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml'));
96if ($search_status < -2) {
101$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
102$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
103$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
104$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
105if (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',
146if ($db->type ==
'pgsql') {
147 unset($fieldstosearchall[
'd.rowid']);
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),
180include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
190if (
GETPOST(
'cancel',
'alpha')) {
194if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
198$parameters = array(
'socid'=>isset($socid) ? $socid : null);
199$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
204if (empty($reshook)) {
206 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
209 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
215 $search_lastname =
"";
216 $search_firstname =
"";
218 $search_civility =
"";
220 $search_company =
"";
223 $search_address =
"";
227 $search_country =
'';
229 $search_phone_perso =
'';
230 $search_phone_mobile =
'';
235 $search_import_key =
'';
239 $search_array_options = array();
243 if ($massaction ==
'close' && $user->hasRight(
'adherent',
'creer')) {
250 foreach ($toselect as $idtoclose) {
251 $tmpmember->fetch($idtoclose);
252 $result = $tmpmember->resiliate($user);
254 if ($result < 0 && !count($tmpmember->errors)) {
273 if ($massaction ==
'createexternaluser' && $user->hasRight(
'adherent',
'creer') && $user->hasRight(
'user',
'user',
'creer')) {
280 foreach ($toselect as $idtoclose) {
281 $tmpmember->fetch($idtoclose);
283 if (!empty($tmpmember->fk_soc)) {
284 $nuser =
new User($db);
287 $result = $nuser->create_from_member($tmpuser, $tmpmember->login);
289 if ($result < 0 && !count($tmpmember->errors)) {
300 setEventMessages($langs->trans(
"XExternalUserCreated", $nbcreated),
null,
'mesgs');
309 $objectclass =
'Adherent';
310 $objectlabel =
'Members';
311 $permissiontoread = $user->hasRight(
'adherent',
'lire');
312 $permissiontodelete = $user->hasRight(
'adherent',
'supprimer');
313 $permissiontoadd = $user->hasRight(
'adherent',
'creer');
314 $uploaddir = $conf->adherent->dir_output;
315 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
323$form =
new Form($db);
331$title = $langs->trans(
"Members").
" - ".$langs->trans(
"List");
332$help_url =
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
339if ((!empty($search_categ) && $search_categ > 0) || !empty($catid)) {
340 $sql =
"SELECT DISTINCT";
344$sql .=
" d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,";
345$sql .=
" d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
346$sql .=
" d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,";
347$sql .=
" d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
348$sql .=
" d.note_private, d.note_public, d.import_key,";
350$sql .=
" ".$db->ifsql(
"d.societe IS NULL",
"s.nom",
"d.societe").
" as companyname,";
351$sql .=
" t.libelle as type, t.subscription,";
352$sql .=
" state.code_departement as state_code, state.nom as state_name";
355if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
356 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
357 $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
362$parameters = array();
363$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
364$sql .= $hookmanager->resPrint;
365$sql = preg_replace(
'/,\s*$/',
'', $sql);
370$sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent as d";
371if (!empty($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) {
372 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (d.rowid = ef.fk_object)";
374$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as country on (country.rowid = d.country)";
375$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_departements as state on (state.rowid = d.state_id)";
376$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe as s on (s.rowid = d.fk_soc)";
379$sql .=
", ".MAIN_DB_PREFIX.
"adherent_type as t";
380$sql .=
" WHERE d.fk_adherent_type = t.rowid";
382if ($catid && empty($search_categ)) {
383 $search_categ = $catid;
386$searchCategoryContactList = $search_categ ? array($search_categ) : array();
387$searchCategoryContactOperator = 0;
389if (!empty($searchCategoryContactList)) {
390 $searchCategoryContactSqlList = array();
391 $listofcategoryid =
'';
392 foreach ($searchCategoryContactList as $searchCategoryContact) {
393 if (intval($searchCategoryContact) == -2) {
394 $searchCategoryContactSqlList[] =
"NOT EXISTS (SELECT ck.fk_categorie FROM ".MAIN_DB_PREFIX.
"categorie_member as ck WHERE d.rowid = ck.fk_member)";
395 } elseif (intval($searchCategoryContact) > 0) {
396 if ($searchCategoryContactOperator == 0) {
397 $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).
")";
399 $listofcategoryid .= ($listofcategoryid ?
', ' :
'') .((
int) $searchCategoryContact);
403 if ($listofcategoryid) {
404 $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).
"))";
406 if ($searchCategoryContactOperator == 1) {
407 if (!empty($searchCategoryContactSqlList)) {
408 $sql .=
" AND (".implode(
' OR ', $searchCategoryContactSqlList).
")";
411 if (!empty($searchCategoryContactSqlList)) {
412 $sql .=
" AND (".implode(
' AND ', $searchCategoryContactSqlList).
")";
417$sql .=
" AND d.entity IN (".getEntity(
'adherent').
")";
419 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
421if ($search_type > 0) {
422 $sql .=
" AND t.rowid=".((int) $search_type);
424if ($search_filter ==
'withoutsubscription') {
425 $sql .=
" AND (datefin IS NULL)";
427if ($search_filter ==
'waitingsubscription') {
428 $sql .=
" AND (datefin IS NULL AND t.subscription = '1')";
430if ($search_filter ==
'uptodate') {
431 $sql .=
" AND (datefin >= '".$db->idate($now).
"' OR (datefin IS NULL AND t.subscription = '0'))";
433if ($search_filter ==
'outofdate') {
434 $sql .=
" AND (datefin < '".$db->idate($now).
"')";
436if ($search_status !=
'') {
438 $sql .=
" AND d.statut in (".$db->sanitize($db->escape($search_status)).
")";
440if ($search_morphy !=
'' && $search_morphy !=
'-1') {
446if ($search_civility) {
449if ($search_firstname) {
452if ($search_lastname) {
453 $sql .=
natural_search(array(
"d.firstname",
"d.lastname",
"d.societe"), $search_lastname);
455if ($search_gender !=
'' && $search_gender !=
'-1') {
461if ($search_company) {
467if ($search_address) {
482if ($search_phone_perso) {
485if ($search_phone_mobile) {
488if ($search_country) {
489 $sql .=
" AND d.country IN (".$db->sanitize($search_country).
')';
491if ($search_import_key) {
495include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
497$parameters = array();
498$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
499$sql .= $hookmanager->resPrint;
502$nbtotalofrecords =
'';
505 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
506 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
507 $resql = $db->query($sqlforcount);
509 $objforcount = $db->fetch_object($resql);
510 $nbtotalofrecords = $objforcount->nbtotalofrecords;
515 if (($page * $limit) > $nbtotalofrecords) {
524$sql .= $db->order($sortfield, $sortorder);
526 $sql .= $db->plimit($limit + 1, $offset);
529$resql = $db->query($sql);
535$num = $db->num_rows($resql);
539if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) {
540 $obj = $db->fetch_object($resql);
542 header(
"Location: ".DOL_URL_ROOT.
'/adherents/card.php?id='.$id);
549llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'bodyforlist');
551$arrayofselected = is_array($toselect) ? $toselect : array();
554if ($search_type > 0) {
556 $result = $membertype->fetch($search_type);
557 $title .=
" (".$membertype->label.
")";
563 $param .=
'&mode='.urlencode($mode);
565if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
566 $param .=
'&contextpage='.urlencode($contextpage);
568if ($limit > 0 && $limit != $conf->liste_limit) {
569 $param .=
'&limit='.((int) $limit);
571if ($optioncss !=
'') {
572 $param .=
'&optioncss='.urlencode($optioncss);
574if ($search_all !=
"") {
575 $param .=
"&search_all=".urlencode($search_all);
578 $param .=
"&search_ref=".urlencode($search_ref);
580if ($search_civility) {
581 $param .=
"&search_civility=".urlencode($search_civility);
583if ($search_firstname) {
584 $param .=
"&search_firstname=".urlencode($search_firstname);
586if ($search_lastname) {
587 $param .=
"&search_lastname=".urlencode($search_lastname);
590 $param .=
"&search_gender=".urlencode($search_gender);
593 $param .=
"&search_login=".urlencode($search_login);
596 $param .=
"&search_email=".urlencode($search_email);
598if ($search_categ > 0 || $search_categ == -2) {
599 $param .=
"&search_categ=".urlencode($search_categ);
601if ($search_company) {
602 $param .=
"&search_company=".urlencode($search_company);
604if ($search_address !=
'') {
605 $param .=
"&search_address=".urlencode($search_address);
607if ($search_town !=
'') {
608 $param .=
"&search_town=".urlencode($search_town);
610if ($search_zip !=
'') {
611 $param .=
"&search_zip=".urlencode($search_zip);
613if ($search_state !=
'') {
614 $param .=
"&search_state=".urlencode($search_state);
616if ($search_country !=
'') {
617 $param .=
"&search_country=".urlencode($search_country);
619if ($search_phone !=
'') {
620 $param .=
"&search_phone=".urlencode($search_phone);
622if ($search_phone_perso !=
'') {
623 $param .=
"&search_phone_perso=".urlencode($search_phone_perso);
625if ($search_phone_mobile !=
'') {
626 $param .=
"&search_phone_mobile=".urlencode($search_phone_mobile);
628if ($search_filter && $search_filter !=
'-1') {
629 $param .=
"&search_filter=".urlencode($search_filter);
631if ($search_status !=
"" && $search_status != -3) {
632 $param .=
"&search_status=".urlencode($search_status);
634if ($search_import_key !=
'') {
635 $param .=
'&search_import_key='.urlencode($search_import_key);
637if ($search_type > 0) {
638 $param .=
"&search_type=".urlencode($search_type);
642include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
645$arrayofmassactions = array(
649if ($user->hasRight(
'adherent',
'creer')) {
650 $arrayofmassactions[
'close'] =
img_picto(
'',
'close_title',
'class="pictofixedwidth"').$langs->trans(
"Resiliate");
652if ($user->hasRight(
'adherent',
'supprimer')) {
653 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
655if (isModEnabled(
'category') && $user->hasRight(
'adherent',
'creer')) {
656 $arrayofmassactions[
'preaffecttag'] =
img_picto(
'',
'category',
'class="pictofixedwidth"').$langs->trans(
"AffectTag");
658if ($user->hasRight(
'adherent',
'creer') && $user->hasRight(
'user',
'user',
'creer')) {
659 $arrayofmassactions[
'createexternaluser'] =
img_picto(
'',
'user',
'class="pictofixedwidth"').$langs->trans(
"CreateExternalUser");
661if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete',
'preaffecttag'))) {
662 $arrayofmassactions = array();
664$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
666print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
667if ($optioncss !=
'') {
668 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
670print
'<input type="hidden" name="token" value="'.newToken().
'">';
671print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
672print
'<input type="hidden" name="action" value="list">';
673print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
674print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
675print
'<input type="hidden" name="page" value="'.$page.
'">';
676print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
677print
'<input type="hidden" name="page_y" value="">';
678print
'<input type="hidden" name="mode" value="'.$mode.
'">';
682$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'));
683$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'));
684if ($user->hasRight(
'adherent',
'creer')) {
686 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewMember'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/adherents/card.php?action=create');
689print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
691$topicmail =
"Information";
692$modelmail =
"member";
694$trackid =
'mem'.$object->id;
695include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
699 foreach ($fieldstosearchall as $key => $val) {
700 $fieldstosearchall[$key] = $langs->trans($val);
701 $setupstring .= $key.
"=".$val.
";";
703 print
'<!-- Search done like if MYOBJECT_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
704 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>'.
"\n";
709if (isModEnabled(
'categorie') && $user->hasRight(
'categorie',
'lire')) {
710 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
711 $moreforfilter .=
'<div class="divsearchfield">';
712 $moreforfilter .=
img_picto($langs->trans(
'Categories'),
'category',
'class="pictofixedlength"').$formother->select_categories(Categorie::TYPE_MEMBER, $search_categ,
'search_categ', 1, $langs->trans(
"MembersCategoriesShort"));
713 $moreforfilter .=
'</div>';
715$parameters = array();
716$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
717if (empty($reshook)) {
718 $moreforfilter .= $hookmanager->resPrint;
720 $moreforfilter = $hookmanager->resPrint;
722if (!empty($moreforfilter)) {
723 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
724 print $moreforfilter;
725 $parameters = array();
726 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
727 print $hookmanager->resPrint;
731$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
732$selectedfields = ($mode !=
'kanban' ? $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN',
'')) :
'');
733$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
735print
'<div class="div-table-responsive">';
736print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
740print
'<tr class="liste_titre_filter">';
744 print
'<td class="liste_titre center maxwidthsearch">';
745 $searchpicto = $form->showFilterButtons(
'left');
751if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
752 print
'<td class="liste_titre"> </td>';
756if (!empty($arrayfields[
'd.ref'][
'checked'])) {
757 print
'<td class="liste_titre">';
758 print
'<input type="text" class="flat maxwidth75imp" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
763if (!empty($arrayfields[
'd.civility'][
'checked'])) {
764 print
'<td class="liste_titre left">';
765 print
'<input class="flat maxwidth50imp" type="text" name="search_civility" value="'.dol_escape_htmltag($search_civility).
'"></td>';
769if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
770 print
'<td class="liste_titre left">';
771 print
'<input class="flat maxwidth75imp" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).
'"></td>';
775if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
776 print
'<td class="liste_titre left">';
777 print
'<input class="flat maxwidth75imp" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).
'"></td>';
781if (!empty($arrayfields[
'd.gender'][
'checked'])) {
782 print
'<td class="liste_titre">';
783 $arraygender = array(
'man'=>$langs->trans(
"Genderman"),
'woman'=>$langs->trans(
"Genderwoman"),
'other'=>$langs->trans(
"Genderother"));
784 print $form->selectarray(
'search_gender', $arraygender, $search_gender, 1);
789if (!empty($arrayfields[
'd.company'][
'checked'])) {
790 print
'<td class="liste_titre left">';
791 print
'<input class="flat maxwidth75imp" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).
'"></td>';
795if (!empty($arrayfields[
'd.login'][
'checked'])) {
796 print
'<td class="liste_titre left">';
797 print
'<input class="flat maxwidth75imp" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).
'"></td>';
801if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
802 print
'<td class="liste_titre center">';
803 $arraymorphy = array(
'mor'=>$langs->trans(
"Moral"),
'phy'=>$langs->trans(
"Physical"));
804 print $form->selectarray(
'search_morphy', $arraymorphy, $search_morphy, 1, 0, 0,
'', 0, 0, 0,
'',
'maxwidth100');
809if (!empty($arrayfields[
't.libelle'][
'checked'])) {
812if (!empty($arrayfields[
't.libelle'][
'checked'])) {
813 print
'<td class="liste_titre">';
814 $listetype = $membertypestatic->liste_array();
815 print $form->selectarray(
"search_type", $listetype, $search_type, 1, 0, 0,
'', 0, 32);
820if (!empty($arrayfields[
'd.address'][
'checked'])) {
821 print
'<td class="liste_titre left">';
822 print
'<input class="flat maxwidth75imp" type="text" name="search_address" value="'.dol_escape_htmltag($search_address).
'"></td>';
826if (!empty($arrayfields[
'd.zip'][
'checked'])) {
827 print
'<td class="liste_titre left">';
828 print
'<input class="flat maxwidth50imp" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).
'"></td>';
832if (!empty($arrayfields[
'd.town'][
'checked'])) {
833 print
'<td class="liste_titre left">';
834 print
'<input class="flat maxwidth75imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).
'"></td>';
838if (!empty($arrayfields[
'state.nom'][
'checked'])) {
839 print
'<td class="liste_titre">';
840 print
'<input class="flat searchstring maxwidth75imp" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).
'">';
845if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
846 print
'<td class="liste_titre center">';
847 print $form->select_country($search_country,
'search_country',
'', 0,
'minwidth100imp maxwidth100');
852if (!empty($arrayfields[
'd.phone'][
'checked'])) {
853 print
'<td class="liste_titre left">';
854 print
'<input class="flat maxwidth75imp" type="text" name="search_phone" value="'.dol_escape_htmltag($search_phone).
'"></td>';
858if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
859 print
'<td class="liste_titre left">';
860 print
'<input class="flat maxwidth75imp" type="text" name="search_phone_perso" value="'.dol_escape_htmltag($search_phone_perso).
'"></td>';
864if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
865 print
'<td class="liste_titre left">';
866 print
'<input class="flat maxwidth75imp" type="text" name="search_phone_mobile" value="'.dol_escape_htmltag($search_phone_mobile).
'"></td>';
870if (!empty($arrayfields[
'd.email'][
'checked'])) {
871 print
'<td class="liste_titre left">';
872 print
'<input class="flat maxwidth75imp" type="text" name="search_email" value="'.dol_escape_htmltag($search_email).
'"></td>';
876if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
877 print
'<td class="liste_titre center">';
879 $selectarray = array(
'-1'=>
'',
'waitingsubscription'=>$langs->trans(
"WaitingSubscription"),
'uptodate'=>$langs->trans(
"UpToDate"),
'outofdate'=>$langs->trans(
"OutOfDate"));
880 print $form->selectarray(
'search_filter', $selectarray, $search_filter);
885include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
888$parameters = array(
'arrayfields'=>$arrayfields);
889$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
890print $hookmanager->resPrint;
893if (!empty($arrayfields[
'd.datec'][
'checked'])) {
894 print
'<td class="liste_titre">';
899if (!empty($arrayfields[
'd.birth'][
'checked'])) {
900 print
'<td class="liste_titre">';
905if (!empty($arrayfields[
'd.tms'][
'checked'])) {
906 print
'<td class="liste_titre">';
911if (!empty($arrayfields[
'd.statut'][
'checked'])) {
912 print
'<td class="liste_titre right parentonrightofpage">';
919 print $form->selectarray(
'search_status', $liststatus, $search_status, -3, 0, 0,
'', 0, 0, 0,
'',
'search_status width100 onrightofpage');
924if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
925 print
'<td class="liste_titre center">';
926 print
'<input class="flat searchstring maxwidth50" type="text" name="search_import_key" value="'.dol_escape_htmltag($search_import_key).
'">';
932 print
'<td class="liste_titre center maxwidthsearch">';
933 $searchpicto = $form->showFilterButtons();
939$totalarray = array();
940$totalarray[
'nbfield'] = 0;
944print
'<tr class="liste_titre">';
947 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch actioncolumn ');
948 $totalarray[
'nbfield']++;
950if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
952 $totalarray[
'nbfield']++;
954if (!empty($arrayfields[
'd.ref'][
'checked'])) {
955 print_liste_field_titre($arrayfields[
'd.ref'][
'label'], $_SERVER[
"PHP_SELF"],
'd.ref',
'', $param,
'', $sortfield, $sortorder);
956 $totalarray[
'nbfield']++;
958if (!empty($arrayfields[
'd.civility'][
'checked'])) {
959 print_liste_field_titre($arrayfields[
'd.civility'][
'label'], $_SERVER[
"PHP_SELF"],
'd.civility',
'', $param,
'', $sortfield, $sortorder);
960 $totalarray[
'nbfield']++;
962if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
963 print_liste_field_titre($arrayfields[
'd.firstname'][
'label'], $_SERVER[
"PHP_SELF"],
'd.firstname',
'', $param,
'', $sortfield, $sortorder);
964 $totalarray[
'nbfield']++;
966if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
967 print_liste_field_titre($arrayfields[
'd.lastname'][
'label'], $_SERVER[
"PHP_SELF"],
'd.lastname',
'', $param,
'', $sortfield, $sortorder);
968 $totalarray[
'nbfield']++;
970if (!empty($arrayfields[
'd.gender'][
'checked'])) {
971 print_liste_field_titre($arrayfields[
'd.gender'][
'label'], $_SERVER[
'PHP_SELF'],
'd.gender', $param,
"",
"", $sortfield, $sortorder);
972 $totalarray[
'nbfield']++;
974if (!empty($arrayfields[
'd.company'][
'checked'])) {
975 print_liste_field_titre($arrayfields[
'd.company'][
'label'], $_SERVER[
"PHP_SELF"],
'companyname',
'', $param,
'', $sortfield, $sortorder);
976 $totalarray[
'nbfield']++;
978if (!empty($arrayfields[
'd.login'][
'checked'])) {
979 print_liste_field_titre($arrayfields[
'd.login'][
'label'], $_SERVER[
"PHP_SELF"],
'd.login',
'', $param,
'', $sortfield, $sortorder);
980 $totalarray[
'nbfield']++;
982if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
983 print_liste_field_titre($arrayfields[
'd.morphy'][
'label'], $_SERVER[
"PHP_SELF"],
'd.morphy',
'', $param,
'', $sortfield, $sortorder);
984 $totalarray[
'nbfield']++;
986if (!empty($arrayfields[
't.libelle'][
'checked'])) {
987 print_liste_field_titre($arrayfields[
't.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
't.libelle',
'', $param,
'', $sortfield, $sortorder);
988 $totalarray[
'nbfield']++;
990if (!empty($arrayfields[
'd.address'][
'checked'])) {
991 print_liste_field_titre($arrayfields[
'd.address'][
'label'], $_SERVER[
"PHP_SELF"],
'd.address',
'', $param,
'', $sortfield, $sortorder);
992 $totalarray[
'nbfield']++;
994if (!empty($arrayfields[
'd.zip'][
'checked'])) {
995 print_liste_field_titre($arrayfields[
'd.zip'][
'label'], $_SERVER[
"PHP_SELF"],
'd.zip',
'', $param,
'', $sortfield, $sortorder);
996 $totalarray[
'nbfield']++;
998if (!empty($arrayfields[
'd.town'][
'checked'])) {
999 print_liste_field_titre($arrayfields[
'd.town'][
'label'], $_SERVER[
"PHP_SELF"],
'd.town',
'', $param,
'', $sortfield, $sortorder);
1000 $totalarray[
'nbfield']++;
1002if (!empty($arrayfields[
'state.nom'][
'checked'])) {
1003 print_liste_field_titre($arrayfields[
'state.nom'][
'label'], $_SERVER[
"PHP_SELF"],
"state.nom",
"", $param,
'', $sortfield, $sortorder);
1004 $totalarray[
'nbfield']++;
1006if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
1007 print_liste_field_titre($arrayfields[
'country.code_iso'][
'label'], $_SERVER[
"PHP_SELF"],
"country.code_iso",
"", $param,
'', $sortfield, $sortorder,
'center ');
1008 $totalarray[
'nbfield']++;
1010if (!empty($arrayfields[
'd.phone'][
'checked'])) {
1011 print_liste_field_titre($arrayfields[
'd.phone'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone',
'', $param,
'', $sortfield, $sortorder);
1012 $totalarray[
'nbfield']++;
1014if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
1015 print_liste_field_titre($arrayfields[
'd.phone_perso'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone_perso',
'', $param,
'', $sortfield, $sortorder);
1016 $totalarray[
'nbfield']++;
1018if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
1019 print_liste_field_titre($arrayfields[
'd.phone_mobile'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone_mobile',
'', $param,
'', $sortfield, $sortorder);
1020 $totalarray[
'nbfield']++;
1022if (!empty($arrayfields[
'd.email'][
'checked'])) {
1023 print_liste_field_titre($arrayfields[
'd.email'][
'label'], $_SERVER[
"PHP_SELF"],
'd.email',
'', $param,
'', $sortfield, $sortorder);
1024 $totalarray[
'nbfield']++;
1026if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
1027 print_liste_field_titre($arrayfields[
'd.datefin'][
'label'], $_SERVER[
"PHP_SELF"],
'd.datefin,t.subscription',
'', $param,
'', $sortfield, $sortorder,
'center ');
1028 $totalarray[
'nbfield']++;
1031include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
1034$parameters = array(
'arrayfields'=>$arrayfields,
'totalarray'=>&$totalarray,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
1035$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
1036print $hookmanager->resPrint;
1038if (!empty($arrayfields[
'd.datec'][
'checked'])) {
1039 print_liste_field_titre($arrayfields[
'd.datec'][
'label'], $_SERVER[
"PHP_SELF"],
"d.datec",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
1040 $totalarray[
'nbfield']++;
1042if (!empty($arrayfields[
'd.birth'][
'checked'])) {
1043 print_liste_field_titre($arrayfields[
'd.birth'][
'label'], $_SERVER[
"PHP_SELF"],
"d.birth",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
1044 $totalarray[
'nbfield']++;
1046if (!empty($arrayfields[
'd.tms'][
'checked'])) {
1047 print_liste_field_titre($arrayfields[
'd.tms'][
'label'], $_SERVER[
"PHP_SELF"],
"d.tms",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
1048 $totalarray[
'nbfield']++;
1050if (!empty($arrayfields[
'd.statut'][
'checked'])) {
1051 print_liste_field_titre($arrayfields[
'd.statut'][
'label'], $_SERVER[
"PHP_SELF"],
"d.statut,t.subscription,d.datefin",
"", $param,
'class="right"', $sortfield, $sortorder);
1052 $totalarray[
'nbfield']++;
1054if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
1055 print_liste_field_titre($arrayfields[
'd.import_key'][
'label'], $_SERVER[
"PHP_SELF"],
"d.import_key",
"", $param,
'', $sortfield, $sortorder,
'center ');
1056 $totalarray[
'nbfield']++;
1059 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
1060 $totalarray[
'nbfield']++;
1067$savnbfield = $totalarray[
'nbfield'];
1068$totalarray = array();
1069$totalarray[
'nbfield'] = 0;
1070$imaxinloop = ($limit ? min($num, $limit) : $num);
1071while ($i < $imaxinloop) {
1072 $obj = $db->fetch_object($resql);
1077 $datefin = $db->jdate($obj->datefin);
1079 $memberstatic->id = $obj->rowid;
1080 $memberstatic->ref = $obj->ref;
1081 $memberstatic->civility_id = $obj->civility;
1082 $memberstatic->login = $obj->login;
1083 $memberstatic->lastname = $obj->lastname;
1084 $memberstatic->firstname = $obj->firstname;
1085 $memberstatic->gender = $obj->gender;
1086 $memberstatic->statut = $obj->statut;
1087 $memberstatic->datefin = $datefin;
1088 $memberstatic->socid = $obj->fk_soc;
1089 $memberstatic->photo = $obj->photo;
1090 $memberstatic->email = $obj->email;
1091 $memberstatic->morphy = $obj->morphy;
1092 $memberstatic->note_public = $obj->note_public;
1093 $memberstatic->note_private = $obj->note_private;
1094 $memberstatic->need_subscription = $obj->subscription;
1096 if (!empty($obj->fk_soc)) {
1097 $memberstatic->fetch_thirdparty();
1098 if ($memberstatic->thirdparty->id > 0) {
1099 $companyname = $memberstatic->thirdparty->name;
1100 $companynametoshow = $memberstatic->thirdparty->getNomUrl(1);
1103 $companyname = $obj->company;
1104 $companynametoshow = $obj->company;
1106 $memberstatic->company = $companyname;
1108 if ($mode ==
'kanban') {
1110 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
1111 print
'<div class="box-flex-container kanban">';
1113 $membertypestatic->id = $obj->type_id;
1114 $membertypestatic->label = $obj->type;
1115 $memberstatic->type = $membertypestatic->label;
1116 $memberstatic->photo = $obj->photo;
1118 print $memberstatic->getKanbanView(
'', array(
'selected' => in_array($object->id, $arrayofselected)));
1119 if ($i == (min($num, $limit) - 1)) {
1126 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
1130 print
'<td class="nowrap center">';
1131 if ($massactionbutton || $massaction) {
1133 if (in_array($obj->rowid, $arrayofselected)) {
1136 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1140 $totalarray[
'nbfield']++;
1144 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
1145 print
'<td class="center" data-key="id">'.$obj->rowid.
'</td>';
1147 $totalarray[
'nbfield']++;
1151 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
1153 print $memberstatic->getNomUrl(-1, 0,
'card',
'ref',
'', -1, 0, 1);
1156 $totalarray[
'nbfield']++;
1160 if (!empty($arrayfields[
'd.civility'][
'checked'])) {
1162 print $obj->civility;
1165 $totalarray[
'nbfield']++;
1169 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
1170 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).
'">';
1171 print $memberstatic->getNomUrl(0, 0,
'card',
'firstname');
1175 $totalarray[
'nbfield']++;
1179 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
1180 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->lastname).
'">';
1181 print $memberstatic->getNomUrl(0, 0,
'card',
'lastname');
1185 $totalarray[
'nbfield']++;
1189 if (!empty($arrayfields[
'd.gender'][
'checked'])) {
1192 print $langs->trans(
"Gender".$obj->gender);
1196 $totalarray[
'nbfield']++;
1200 if (!empty($arrayfields[
'd.company'][
'checked'])) {
1201 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($companyname).
'">';
1202 print $companynametoshow;
1206 if (!empty($arrayfields[
'd.login'][
'checked'])) {
1207 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->login).
'">'.$obj->login.
"</td>\n";
1209 $totalarray[
'nbfield']++;
1213 if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
1214 print
'<td class="center">';
1215 print $memberstatic->getmorphylib(
'', 2);
1218 $totalarray[
'nbfield']++;
1222 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
1223 $membertypestatic->id = $obj->type_id;
1224 $membertypestatic->label = $obj->type;
1225 print
'<td class="nowraponall">';
1226 print $membertypestatic->getNomUrl(1, 32);
1229 $totalarray[
'nbfield']++;
1233 if (!empty($arrayfields[
'd.address'][
'checked'])) {
1234 print
'<td class="nocellnopadd tdoverflowmax200" title="'.dol_escape_htmltag($obj->address).
'">';
1235 print $obj->address;
1238 $totalarray[
'nbfield']++;
1242 if (!empty($arrayfields[
'd.zip'][
'checked'])) {
1243 print
'<td class="nocellnopadd">';
1247 $totalarray[
'nbfield']++;
1251 if (!empty($arrayfields[
'd.town'][
'checked'])) {
1252 print
'<td class="nocellnopadd">';
1256 $totalarray[
'nbfield']++;
1260 if (!empty($arrayfields[
'state.nom'][
'checked'])) {
1261 print
"<td>".$obj->state_name.
"</td>\n";
1263 $totalarray[
'nbfield']++;
1267 if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
1268 $tmparray =
getCountry($obj->country,
'all');
1269 print
'<td class="center tdoverflowmax100" title="'.dol_escape_htmltag($tmparray[
'label']).
'">';
1273 $totalarray[
'nbfield']++;
1277 if (!empty($arrayfields[
'd.phone'][
'checked'])) {
1278 print
'<td class="nocellnopadd">';
1282 $totalarray[
'nbfield']++;
1286 if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
1287 print
'<td class="nocellnopadd">';
1288 print $obj->phone_perso;
1291 $totalarray[
'nbfield']++;
1295 if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
1296 print
'<td class="nocellnopadd">';
1297 print $obj->phone_mobile;
1300 $totalarray[
'nbfield']++;
1304 if (!empty($arrayfields[
'd.email'][
'checked'])) {
1305 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->email).
'">';
1309 $totalarray[
'nbfield']++;
1313 $datefin = $db->jdate($obj->datefin);
1314 if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
1315 print
'<td class="nowrap center">';
1318 if ($memberstatic->hasDelay()) {
1319 $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").
')';
1320 print
" ".img_warning($langs->trans(
"SubscriptionLate").$textlate);
1323 if (!empty($obj->subscription)) {
1324 print
'<span class="opacitymedium">'.$langs->trans(
"SubscriptionNotReceived").
'</span>';
1325 if ($obj->statut > 0) {
1326 print
" ".img_warning();
1334 $totalarray[
'nbfield']++;
1338 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1340 $parameters = array(
'arrayfields'=>$arrayfields,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
1341 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
1342 print $hookmanager->resPrint;
1344 if (!empty($arrayfields[
'd.datec'][
'checked'])) {
1345 print
'<td class="nowrap center">';
1346 print
dol_print_date($db->jdate($obj->date_creation),
'dayhour',
'tzuser');
1349 $totalarray[
'nbfield']++;
1353 if (!empty($arrayfields[
'd.birth'][
'checked'])) {
1354 print
'<td class="nowrap center">';
1358 $totalarray[
'nbfield']++;
1362 if (!empty($arrayfields[
'd.tms'][
'checked'])) {
1363 print
'<td class="nowrap center">';
1364 print
dol_print_date($db->jdate($obj->date_update),
'dayhour',
'tzuser');
1367 $totalarray[
'nbfield']++;
1371 if (!empty($arrayfields[
'd.statut'][
'checked'])) {
1372 print
'<td class="nowrap right">';
1373 print $memberstatic->LibStatut($obj->statut, $obj->subscription, $datefin, 5);
1376 $totalarray[
'nbfield']++;
1379 if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
1380 print
'<td class="tdoverflowmax100 center" title="'.dol_escape_htmltag($obj->import_key).
'">';
1384 $totalarray[
'nbfield']++;
1389 print
'<td class="center">';
1390 if ($massactionbutton || $massaction) {
1392 if (in_array($obj->rowid, $arrayofselected)) {
1395 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1399 $totalarray[
'nbfield']++;
1409include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1415 foreach ($arrayfields as $key => $val) {
1416 if (!empty($val[
'checked'])) {
1420 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
1425$parameters = array(
'arrayfields'=>$arrayfields,
'sql' => $sql);
1426$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
1427print $hookmanager->resPrint;
1429print
'</table>'.
"\n";
1432print
'</form>'.
"\n";
1434if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
1435 $hidegeneratedfilelistifempty = 1;
1436 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
1437 $hidegeneratedfilelistifempty = 0;
1440 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
1444 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
1445 $urlsource .= str_replace(
'&',
'&', $param);
1447 $filedir = $diroutputmassaction;
1448 $genallowed = $permissiontoread;
1449 $delallowed = $permissiontoadd;
1451 print $formfile->showdocuments(
'massfilesarea_'.$object->module,
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'',
null, $hidegeneratedfilelistifempty);
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage members of a foundation.
const STATUS_EXCLUDED
Excluded.
const STATUS_DRAFT
Draft status.
const STATUS_RESILIATED
Resiliated.
const STATUS_VALIDATED
Validated status.
Class to manage members type.
Class to manage Dolibarr users.
getCountry($searchkey, $withcode='', $dbtouse=0, $outputlangs='', $entconv=1, $searchlabel='')
Return country label, code or id from an id, code or label.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.
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_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_print_email($email, $cid=0, $socid=0, $addlink=0, $max=64, $showinvalid=1, $withpicto=0)
Show EMail link formatted for HTML output.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_clone($object, $native=0)
Create a clone of instance of object (new instance with same value for each properties) With native =...
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show 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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
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.