34require
'../main.inc.php';
35require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
42$langs->loadLangs(array(
"members",
"companies",
"categories"));
46$action =
GETPOST(
'action',
'aZ09');
47$massaction =
GETPOST(
'massaction',
'alpha');
49$confirm =
GETPOST(
'confirm',
'alpha');
50$cancel =
GETPOST(
'cancel',
'alpha');
51$toselect =
GETPOST(
'toselect',
'array');
52$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'memberslist';
53$backtopage =
GETPOST(
'backtopage',
'alpha');
54$optioncss =
GETPOST(
'optioncss',
'aZ');
55$mode =
GETPOST(
'mode',
'alpha');
58$search =
GETPOST(
"search",
'alpha');
59$search_id =
GETPOST(
'search_id',
'int');
60$search_ref =
GETPOST(
"search_ref",
'alpha');
61$search_lastname =
GETPOST(
"search_lastname",
'alpha');
62$search_firstname =
GETPOST(
"search_firstname",
'alpha');
63$search_gender =
GETPOST(
"search_gender",
'alpha');
64$search_civility =
GETPOST(
"search_civility",
'alpha');
65$search_company =
GETPOST(
'search_company',
'alphanohtml');
66$search_login =
GETPOST(
"search_login",
'alpha');
67$search_address =
GETPOST(
"search_address",
'alpha');
68$search_zip =
GETPOST(
"search_zip",
'alpha');
69$search_town =
GETPOST(
"search_town",
'alpha');
70$search_state =
GETPOST(
"search_state",
'alpha');
71$search_country =
GETPOST(
"search_country",
'alpha');
72$search_phone =
GETPOST(
"search_phone",
'alpha');
73$search_phone_perso =
GETPOST(
"search_phone_perso",
'alpha');
74$search_phone_mobile =
GETPOST(
"search_phone_mobile",
'alpha');
75$search_type =
GETPOST(
"search_type",
'alpha');
76$search_email =
GETPOST(
"search_email",
'alpha');
77$search_categ =
GETPOST(
"search_categ",
'intcomma');
78$search_morphy =
GETPOST(
"search_morphy",
'alpha');
79$search_import_key = trim(
GETPOST(
"search_import_key",
'alpha'));
82if (
GETPOSTINT(
'catid') && empty($search_categ)) {
86$search_filter =
GETPOST(
"search_filter",
'alpha');
87$search_status =
GETPOST(
"search_status",
'intcomma');
93$filter =
GETPOST(
"filter",
'alpha');
95 $search_filter = $filter;
98$statut =
GETPOST(
"statut",
'alpha');
100 $search_status = $statut;
103$search_all = trim((
GETPOST(
'search_all',
'alphanohtml') !=
'') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml'));
105if ($search_status < -2) {
111$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
112$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
114if (empty($page) || $page == -1) {
117$offset = $limit * $page;
118$pageprev = $page - 1;
119$pagenext = $page + 1;
121 $sortorder = ($filter ==
'outofdate' ?
"DESC" :
"ASC");
124 $sortfield = ($filter ==
'outofdate' ?
"d.datefin" :
"d.lastname");
130$hookmanager->initHooks(array(
'memberlist'));
134$extrafields->fetch_name_optionals_label(
$object->table_element);
136$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
139$fieldstosearchall = array(
141 'd.login' =>
'Login',
142 'd.lastname' =>
'Lastname',
143 'd.firstname' =>
'Firstname',
144 'd.societe' =>
"Company",
145 'd.email' =>
'EMail',
146 'd.address' =>
'Address',
149 'd.phone' =>
"Phone",
150 'd.phone_perso' =>
"PhonePerso",
151 'd.phone_mobile' =>
"PhoneMobile",
152 'd.note_public' =>
'NotePublic',
153 'd.note_private' =>
'NotePrivate',
157 'd.rowid' => array(
'label' =>
'ID',
'checked' => 1,
'enabled' =>
getDolGlobalInt(
'MAIN_SHOW_TECHNICAL_ID'),
'position' => 1),
158 'd.ref' => array(
'label' =>
"Ref",
'checked' => 1),
159 'd.civility' => array(
'label' =>
"Civility",
'checked' => 0),
160 'd.lastname' => array(
'label' =>
"Lastname",
'checked' => 1),
161 'd.firstname' => array(
'label' =>
"Firstname",
'checked' => 1),
162 'd.gender' => array(
'label' =>
"Gender",
'checked' => 0),
163 'd.company' => array(
'label' =>
"Company",
'checked' => 1,
'position' => 70),
164 'd.login' => array(
'label' =>
"Login",
'checked' => 1),
165 'd.morphy' => array(
'label' =>
"MemberNature",
'checked' => 1),
166 't.libelle' => array(
'label' =>
"Type",
'checked' => 1,
'position' => 55),
167 'd.address' => array(
'label' =>
"Address",
'checked' => 0),
168 'd.zip' => array(
'label' =>
"Zip",
'checked' => 0),
169 'd.town' => array(
'label' =>
"Town",
'checked' => 0),
170 'd.phone' => array(
'label' =>
"Phone",
'checked' => 0),
171 'd.phone_perso' => array(
'label' =>
"PhonePerso",
'checked' => 0),
172 'd.phone_mobile' => array(
'label' =>
"PhoneMobile",
'checked' => 0),
173 'd.email' => array(
'label' =>
"Email",
'checked' => 1),
174 'state.nom' => array(
'label' =>
"State",
'checked' => 0,
'position' => 90),
175 'country.code_iso' => array(
'label' =>
"Country",
'checked' => 0,
'position' => 95),
178 'd.datefin' => array(
'label' =>
"EndSubscription"),
179 'd.datec' => array(
'label' =>
"DateCreation"),
180 'd.birth' => array(
'label' =>
"Birthday"),
181 'd.tms' => array(
'label' =>
"DateModificationShort"),
182 'd.statut' => array(
'label' =>
"Status"),
183 'd.import_key' => array(
'label' =>
"ImportId"),
187include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
194foreach (
$object->fields as $key => $val) {
195 if (!array_key_exists($tableprefix.
'.'.$key, $arrayfields)) {
200 if (!empty($val[
'visible'])) {
201 $visible = (int)
dol_eval($val[
'visible'], 1);
202 $arrayfields[$tableprefix.
'.'.$key] = array(
203 'label' => $val[
'label'],
204 'checked' => (($visible < 0) ? 0 : 1),
205 'enabled' => (abs($visible) != 3 && (bool)
dol_eval($val[
'enabled'], 1)),
206 'position' => $val[
'position'],
207 'help' => isset($val[
'help']) ? $val[
'help'] :
''
212'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';
223if (
GETPOST(
'cancel',
'alpha')) {
227if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
231$parameters = array(
'socid' => isset($socid) ? $socid : null,
'arrayfields' => &$arrayfields);
232$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
237if (empty($reshook)) {
239 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
242 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
249 $search_lastname =
"";
250 $search_firstname =
"";
252 $search_civility =
"";
254 $search_company =
"";
257 $search_address =
"";
261 $search_country =
'';
263 $search_phone_perso =
'';
264 $search_phone_mobile =
'';
269 $search_import_key =
'';
272 $search_datec_start =
'';
273 $search_datec_end =
'';
274 $search_datem_start =
'';
275 $search_datem_end =
'';
276 $search_array_options = array();
280 if ($massaction ==
'close' && $user->hasRight(
'adherent',
'creer')) {
287 foreach ($toselect as $idtoclose) {
288 $tmpmember->fetch($idtoclose);
289 $result = $tmpmember->resiliate($user);
291 if ($result < 0 && !count($tmpmember->errors)) {
310 if ($massaction ==
'createexternaluser' && $user->hasRight(
'adherent',
'creer') && $user->hasRight(
'user',
'user',
'creer')) {
317 foreach ($toselect as $idtoclose) {
318 $tmpmember->fetch($idtoclose);
320 if (!empty($tmpmember->socid)) {
321 $nuser =
new User($db);
324 $result = $nuser->create_from_member($tmpuser, $tmpmember->login);
326 if ($result < 0 && !count($tmpmember->errors)) {
337 setEventMessages($langs->trans(
"XExternalUserCreated", $nbcreated),
null,
'mesgs');
346 if ($action ==
'createsubscription_confirm' && $confirm ==
"yes" && $user->hasRight(
'adherent',
'creer')) {
354 foreach ($toselect as $id) {
355 $res = $tmpmember->fetch($id);
357 $result = $tmpmember->subscription($now, $amount);
369 setEventMessages($langs->trans(
"XSubsriptionCreated", $nbcreated),
null,
'mesgs');
372 setEventMessages($langs->trans(
"XSubsriptionError", $error),
null,
'mesgs');
378 $objectclass =
'Adherent';
379 $objectlabel =
'Members';
380 $permissiontoread = $user->hasRight(
'adherent',
'lire');
381 $permissiontodelete = $user->hasRight(
'adherent',
'supprimer');
382 $permissiontoadd = $user->hasRight(
'adherent',
'creer');
383 $uploaddir = $conf->adherent->dir_output;
384 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
392$form =
new Form($db);
400$title = $langs->trans(
"Members").
" - ".$langs->trans(
"List");
401$help_url =
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
408if (!empty($search_categ) && $search_categ > 0) {
409 $sql =
"SELECT DISTINCT";
413$sql .=
" d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,";
414$sql .=
" d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
415$sql .=
" d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,";
416$sql .=
" d.fk_adherent_type as type_id, d.morphy, d.statut as status, d.datec as date_creation, d.tms as date_modification,";
417$sql .=
" d.note_private, d.note_public, d.import_key,";
419$sql .=
" ".$db->ifsql(
"d.societe IS NULL",
"s.nom",
"d.societe").
" as companyname,";
420$sql .=
" t.libelle as type, t.subscription,";
421$sql .=
" state.code_departement as state_code, state.nom as state_name";
424if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
425 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
426 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
431$parameters = array();
432$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
433$sql .= $hookmanager->resPrint;
434$sql = preg_replace(
'/,\s*$/',
'', $sql);
439$sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent as d";
440if (!empty($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
441 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (d.rowid = ef.fk_object)";
443$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as country on (country.rowid = d.country)";
444$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_departements as state on (state.rowid = d.state_id)";
445$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe as s on (s.rowid = d.fk_soc)";
448$sql .=
", ".MAIN_DB_PREFIX.
"adherent_type as t";
449$sql .=
" WHERE d.fk_adherent_type = t.rowid";
451$searchCategoryContactList = $search_categ ? array($search_categ) : array();
452$searchCategoryContactOperator = 0;
454if (!empty($searchCategoryContactList)) {
455 $searchCategoryContactSqlList = array();
456 $listofcategoryid =
'';
457 foreach ($searchCategoryContactList as $searchCategoryContact) {
458 if (intval($searchCategoryContact) == -2) {
459 $searchCategoryContactSqlList[] =
"NOT EXISTS (SELECT ck.fk_categorie FROM ".MAIN_DB_PREFIX.
"categorie_member as ck WHERE d.rowid = ck.fk_member)";
460 } elseif (intval($searchCategoryContact) > 0) {
461 if ($searchCategoryContactOperator == 0) {
462 $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).
")";
464 $listofcategoryid .= ($listofcategoryid ?
', ' :
'') .((
int) $searchCategoryContact);
468 if ($listofcategoryid) {
469 $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).
"))";
471 if ($searchCategoryContactOperator == 1) {
472 if (!empty($searchCategoryContactSqlList)) {
473 $sql .=
" AND (".implode(
' OR ', $searchCategoryContactSqlList).
")";
476 if (!empty($searchCategoryContactSqlList)) {
477 $sql .=
" AND (".implode(
' AND ', $searchCategoryContactSqlList).
")";
482$sql .=
" AND d.entity IN (".getEntity(
'adherent').
")";
484 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
486if ($search_type > 0) {
487 $sql .=
" AND t.rowid=".((int) $search_type);
489if ($search_filter ==
'withoutsubscription') {
490 $sql .=
" AND (datefin IS NULL)";
492if ($search_filter ==
'waitingsubscription') {
493 $sql .=
" AND (datefin IS NULL AND t.subscription = '1')";
495if ($search_filter ==
'uptodate') {
498 $sql .=
" AND (datefin >= '".$db->idate($now).
"' OR (datefin IS NULL AND t.subscription = '0'))";
500if ($search_filter ==
'outofdate') {
501 $sql .=
" AND (datefin < '".$db->idate($now).
"')";
503if ($search_status !=
'') {
505 $sql .=
" AND d.statut in (".$db->sanitize($db->escape($search_status)).
")";
507if ($search_morphy !=
'' && $search_morphy !=
'-1') {
516if ($search_civility) {
519if ($search_firstname) {
522if ($search_lastname) {
525if ($search_gender !=
'' && $search_gender !=
'-1') {
531if ($search_company) {
532 $sql .=
natural_search(array(
"s.nom",
"d.societe"), $search_company);
537if ($search_address) {
552if ($search_phone_perso) {
555if ($search_phone_mobile) {
558if ($search_country) {
559 $sql .=
" AND d.country IN (".$db->sanitize($search_country).
')';
561if ($search_import_key) {
564if ($search_datec_start) {
565 $sql .=
" AND d.datec >= '".$db->idate($search_datec_start).
"'";
567if ($search_datec_end) {
568 $sql .=
" AND d.datec <= '".$db->idate($search_datec_end).
"'";
570if ($search_datem_start) {
571 $sql .=
" AND d.tms >= '".$db->idate($search_datem_start).
"'";
573if ($search_datem_end) {
574 $sql .=
" AND d.tms <= '".$db->idate($search_datem_end).
"'";
577include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
579$parameters = array();
580$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
581$sql .= $hookmanager->resPrint;
584$nbtotalofrecords =
'';
587 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
588 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
589 $resql = $db->query($sqlforcount);
591 $objforcount = $db->fetch_object($resql);
592 $nbtotalofrecords = $objforcount->nbtotalofrecords;
597 if (($page * $limit) > $nbtotalofrecords) {
606$sql .= $db->order($sortfield, $sortorder);
608 $sql .= $db->plimit($limit + 1, $offset);
611$resql = $db->query($sql);
617$num = $db->num_rows($resql);
621if ($num == 1 &&
getDolGlobalString(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
622 $obj = $db->fetch_object($resql);
624 header(
"Location: ".DOL_URL_ROOT.
'/adherents/card.php?id='.$id);
631llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'bodyforlist');
633$arrayofselected = is_array($toselect) ? $toselect : array();
636if ($search_type > 0) {
638 $result = $membertype->fetch($search_type);
639 $title .=
" (".$membertype->label.
")";
645 $param .=
'&mode='.urlencode($mode);
647if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
648 $param .=
'&contextpage='.urlencode($contextpage);
650if ($limit > 0 && $limit != $conf->liste_limit) {
651 $param .=
'&limit='.((int) $limit);
653if ($optioncss !=
'') {
654 $param .=
'&optioncss='.urlencode($optioncss);
656if ($search_all !=
"") {
657 $param .=
"&search_all=".urlencode($search_all);
660 $param .=
"&search_ref=".urlencode($search_ref);
662if ($search_civility) {
663 $param .=
"&search_civility=".urlencode($search_civility);
665if ($search_firstname) {
666 $param .=
"&search_firstname=".urlencode($search_firstname);
668if ($search_lastname) {
669 $param .=
"&search_lastname=".urlencode($search_lastname);
672 $param .=
"&search_gender=".urlencode($search_gender);
675 $param .=
"&search_login=".urlencode($search_login);
678 $param .=
"&search_email=".urlencode($search_email);
680if ($search_categ > 0 || $search_categ == -2) {
681 $param .=
"&search_categ=".urlencode((
string) ($search_categ));
683if ($search_company) {
684 $param .=
"&search_company=".urlencode($search_company);
686if ($search_address !=
'') {
687 $param .=
"&search_address=".urlencode($search_address);
689if ($search_town !=
'') {
690 $param .=
"&search_town=".urlencode($search_town);
692if ($search_zip !=
'') {
693 $param .=
"&search_zip=".urlencode($search_zip);
695if ($search_state !=
'') {
696 $param .=
"&search_state=".urlencode($search_state);
698if ($search_country !=
'') {
699 $param .=
"&search_country=".urlencode($search_country);
701if ($search_phone !=
'') {
702 $param .=
"&search_phone=".urlencode($search_phone);
704if ($search_phone_perso !=
'') {
705 $param .=
"&search_phone_perso=".urlencode($search_phone_perso);
707if ($search_phone_mobile !=
'') {
708 $param .=
"&search_phone_mobile=".urlencode($search_phone_mobile);
710if ($search_filter && $search_filter !=
'-1') {
711 $param .=
"&search_filter=".urlencode($search_filter);
713if ($search_status !=
"" && $search_status != -3) {
714 $param .=
"&search_status=".urlencode($search_status);
716if ($search_import_key !=
'') {
717 $param .=
'&search_import_key='.urlencode($search_import_key);
719if ($search_type > 0) {
720 $param .=
"&search_type=".urlencode($search_type);
722if ($search_datec_start) {
723 $param .=
'&search_datec_start_day='.dol_print_date($search_datec_start,
'%d').
'&search_datec_start_month='.
dol_print_date($search_datec_start,
'%m').
'&search_datec_start_year='.
dol_print_date($search_datec_start,
'%Y');
725if ($search_datem_end) {
726 $param .=
'&search_datem_end_day='.dol_print_date($search_datem_end,
'%d').
'&search_datem_end_month='.
dol_print_date($search_datem_end,
'%m').
'&search_datem_end_year='.
dol_print_date($search_datem_end,
'%Y');
730include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
733$arrayofmassactions = array(
737if ($user->hasRight(
'adherent',
'creer')) {
738 $arrayofmassactions[
'close'] =
img_picto(
'',
'close_title',
'class="pictofixedwidth"').$langs->trans(
"Resiliate");
740if ($user->hasRight(
'adherent',
'supprimer')) {
741 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
743if (isModEnabled(
'category') && $user->hasRight(
'adherent',
'creer')) {
744 $arrayofmassactions[
'preaffecttag'] =
img_picto(
'',
'category',
'class="pictofixedwidth"').$langs->trans(
"AffectTag");
746if ($user->hasRight(
'adherent',
'creer') && $user->hasRight(
'user',
'user',
'creer')) {
747 $arrayofmassactions[
'createexternaluser'] =
img_picto(
'',
'user',
'class="pictofixedwidth"').$langs->trans(
"CreateExternalUser");
749if ($user->hasRight(
'adherent',
'creer')) {
750 $arrayofmassactions[
'createsubscription'] =
img_picto(
'',
'payment',
'class="pictofixedwidth"').$langs->trans(
"CreateSubscription");
752if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete',
'preaffecttag'))) {
753 $arrayofmassactions = array();
755$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
757print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
758if ($optioncss !=
'') {
759 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
761print
'<input type="hidden" name="token" value="'.newToken().
'">';
762print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
763print
'<input type="hidden" name="action" value="list">';
764print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
765print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
766print
'<input type="hidden" name="page" value="'.$page.
'">';
767print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
768print
'<input type="hidden" name="page_y" value="">';
769print
'<input type="hidden" name="mode" value="'.$mode.
'">';
773$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'));
774$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'));
775if ($user->hasRight(
'adherent',
'creer')) {
777 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewMember'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/adherents/card.php?action=create');
780print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
782$topicmail =
"Information";
783$modelmail =
"member";
785$trackid =
'mem'.$object->id;
786if ($massaction ==
'createsubscription') {
790 foreach ($toselect as $id) {
792 $tmpmember->fetch($id);
793 $res = $adht->fetch($tmpmember->typeid);
795 $amounttmp = $adht->amount;
796 if (!empty($tmpmember->last_subscription_amount) && !GETPOSTISSET(
'newamount') && is_numeric($amounttmp)) {
797 $amounttmp = max($tmpmember->last_subscription_amount, $amount);
799 $amount = max(0, $amounttmp, $amount);
806 $formquestion = array(
807 array(
'label' => $langs->trans(
"DateSubscription"),
'type' =>
'other',
'value' => $date),
808 array(
'label' => $langs->trans(
"Amount"),
'type' =>
'text',
'value' =>
price($amount, 0,
'', 0),
'name' =>
'amount'),
809 array(
'type' =>
'separator'),
810 array(
'label' => $langs->trans(
"MoreActions"),
'type' =>
'other',
'value' => $langs->trans(
"None").
' '.
img_warning($langs->trans(
"WarningNoComplementaryActionDone"))),
812 print $form->formconfirm($_SERVER[
"PHP_SELF"], $langs->trans(
"ConfirmMassSubsriptionCreation"), $langs->trans(
"ConfirmMassSubsriptionCreationQuestion", count($toselect)),
"createsubscription_confirm", $formquestion,
'', 0, 200, 500, 1);
814include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
818 foreach ($fieldstosearchall as $key => $val) {
819 $fieldstosearchall[$key] = $langs->trans($val);
820 $setupstring .= $key.
"=".$val.
";";
822 print
'<!-- Search done like if MYOBJECT_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
823 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>'.
"\n";
826$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
827$htmlofselectarray = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
828$selectedfields = ($mode !=
'kanban' ? $htmlofselectarray :
'');
829$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
833if (isModEnabled(
'category') && $user->hasRight(
'categorie',
'lire')) {
834 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
835 $moreforfilter .=
'<div class="divsearchfield">';
836 $moreforfilter .=
img_picto($langs->trans(
'Categories'),
'category',
'class="pictofixedwidth"').$formother->select_categories(Categorie::TYPE_MEMBER, $search_categ,
'search_categ', 1, $langs->trans(
"MembersCategoriesShort"));
837 $moreforfilter .=
'</div>';
840 'arrayfields' => &$arrayfields,
842$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
843if (empty($reshook)) {
844 $moreforfilter .= $hookmanager->resPrint;
846 $moreforfilter = $hookmanager->resPrint;
848if (!empty($moreforfilter)) {
849 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
850 print $moreforfilter;
854print
'<div class="div-table-responsive">';
855print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
859print
'<tr class="liste_titre_filter">';
863 print
'<td class="liste_titre center maxwidthsearch">';
864 $searchpicto = $form->showFilterButtons(
'left');
870if (!empty($arrayfields[
'd.rowid'][
'checked'])) {
871 print
'<td class="liste_titre">';
872 print
'<input class="flat" size="6" type="text" name="search_id" value="'.dol_escape_htmltag($search_id).
'">';
877if (!empty($arrayfields[
'd.ref'][
'checked'])) {
878 print
'<td class="liste_titre">';
879 print
'<input type="text" class="flat maxwidth75imp" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
884if (!empty($arrayfields[
'd.civility'][
'checked'])) {
885 print
'<td class="liste_titre left">';
886 print
'<input class="flat maxwidth50imp" type="text" name="search_civility" value="'.dol_escape_htmltag($search_civility).
'"></td>';
890if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
891 print
'<td class="liste_titre left">';
892 print
'<input class="flat maxwidth75imp" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).
'"></td>';
896if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
897 print
'<td class="liste_titre left">';
898 print
'<input class="flat maxwidth75imp" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).
'"></td>';
902if (!empty($arrayfields[
'd.gender'][
'checked'])) {
903 print
'<td class="liste_titre">';
904 $arraygender = array(
'man' => $langs->trans(
"Genderman"),
'woman' => $langs->trans(
"Genderwoman"),
'other' => $langs->trans(
"Genderother"));
905 print $form->selectarray(
'search_gender', $arraygender, $search_gender, 1);
910if (!empty($arrayfields[
'd.company'][
'checked'])) {
911 print
'<td class="liste_titre left">';
912 print
'<input class="flat maxwidth75imp" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).
'"></td>';
916if (!empty($arrayfields[
'd.login'][
'checked'])) {
917 print
'<td class="liste_titre left">';
918 print
'<input class="flat maxwidth75imp" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).
'"></td>';
922if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
923 print
'<td class="liste_titre center">';
924 $arraymorphy = array(
'mor' => $langs->trans(
"Moral"),
'phy' => $langs->trans(
"Physical"));
925 print $form->selectarray(
'search_morphy', $arraymorphy, $search_morphy, 1, 0, 0,
'', 0, 0, 0,
'',
'maxwidth100');
930if (!empty($arrayfields[
't.libelle'][
'checked'])) {
933if (!empty($arrayfields[
't.libelle'][
'checked'])) {
934 print
'<td class="liste_titre">';
935 $listetype = $membertypestatic->liste_array();
937 print $form->selectarray(
"search_type", $listetype, $search_type, 1, 0, 0,
'', 0, 32);
942if (!empty($arrayfields[
'd.address'][
'checked'])) {
943 print
'<td class="liste_titre left">';
944 print
'<input class="flat maxwidth75imp" type="text" name="search_address" value="'.dol_escape_htmltag($search_address).
'"></td>';
948if (!empty($arrayfields[
'd.zip'][
'checked'])) {
949 print
'<td class="liste_titre left">';
950 print
'<input class="flat maxwidth50imp" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).
'"></td>';
954if (!empty($arrayfields[
'd.town'][
'checked'])) {
955 print
'<td class="liste_titre left">';
956 print
'<input class="flat maxwidth75imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).
'"></td>';
960if (!empty($arrayfields[
'state.nom'][
'checked'])) {
961 print
'<td class="liste_titre">';
962 print
'<input class="flat searchstring maxwidth75imp" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).
'">';
967if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
968 print
'<td class="liste_titre center">';
969 print $form->select_country($search_country,
'search_country',
'', 0,
'minwidth100imp maxwidth100');
974if (!empty($arrayfields[
'd.phone'][
'checked'])) {
975 print
'<td class="liste_titre left">';
976 print
'<input class="flat maxwidth75imp" type="text" name="search_phone" value="'.dol_escape_htmltag($search_phone).
'"></td>';
980if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
981 print
'<td class="liste_titre left">';
982 print
'<input class="flat maxwidth75imp" type="text" name="search_phone_perso" value="'.dol_escape_htmltag($search_phone_perso).
'"></td>';
986if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
987 print
'<td class="liste_titre left">';
988 print
'<input class="flat maxwidth75imp" type="text" name="search_phone_mobile" value="'.dol_escape_htmltag($search_phone_mobile).
'"></td>';
992if (!empty($arrayfields[
'd.email'][
'checked'])) {
993 print
'<td class="liste_titre left">';
994 print
'<input class="flat maxwidth75imp" type="text" name="search_email" value="'.dol_escape_htmltag($search_email).
'"></td>';
998if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
999 print
'<td class="liste_titre center">';
1001 $selectarray = array(
'-1' =>
'',
'waitingsubscription' => $langs->trans(
"WaitingSubscription"),
'uptodate' => $langs->trans(
"UpToDate"),
'outofdate' => $langs->trans(
"OutOfDate"));
1002 print $form->selectarray(
'search_filter', $selectarray, $search_filter);
1007include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
1010$parameters = array(
'arrayfields' => $arrayfields);
1011$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
1012print $hookmanager->resPrint;
1015if (!empty($arrayfields[
'd.datec'][
'checked'])) {
1016 print
'<td class="liste_titre">';
1017 print
'<div class="nowrapfordate">';
1018 print $form->selectDate($search_datec_start ? $search_datec_start : -1,
'search_datec_start_', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
1020 print
'<div class="nowrapfordate">';
1021 print $form->selectDate($search_datec_end ? $search_datec_end : -1,
'search_datec_end_', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
1027if (!empty($arrayfields[
'd.birth'][
'checked'])) {
1028 print
'<td class="liste_titre">';
1033if (!empty($arrayfields[
'd.tms'][
'checked'])) {
1034 print
'<td class="liste_titre">';
1035 print
'<div class="nowrapfordate">';
1036 print $form->selectDate($search_datem_start ? $search_datem_start : -1,
'search_datem_start_', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
1038 print
'<div class="nowrapfordate">';
1039 print $form->selectDate($search_datem_end ? $search_datem_end : -1,
'search_datem_end_', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
1045if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
1046 print
'<td class="liste_titre center">';
1047 print
'<input class="flat searchstring maxwidth50" type="text" name="search_import_key" value="'.dol_escape_htmltag($search_import_key).
'">';
1052if (!empty($arrayfields[
'd.statut'][
'checked'])) {
1053 print
'<td class="liste_titre center parentonrightofpage">';
1054 $liststatus = array(
1061 print $form->selectarray(
'search_status', $liststatus, $search_status, -3, 0, 0,
'', 0, 0, 0,
'',
'search_status width100 onrightofpage');
1067 print
'<td class="liste_titre center maxwidthsearch">';
1068 $searchpicto = $form->showFilterButtons();
1074$totalarray = array();
1075$totalarray[
'nbfield'] = 0;
1079print
'<tr class="liste_titre">';
1082 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch actioncolumn ');
1083 $totalarray[
'nbfield']++;
1085if (!empty($arrayfields[
'd.rowid'][
'checked'])) {
1086 print_liste_field_titre($arrayfields[
'd.rowid'][
'label'], $_SERVER[
"PHP_SELF"],
'd.rowid',
'', $param,
'', $sortfield, $sortorder,
'center ');
1087 $totalarray[
'nbfield']++;
1089if (!empty($arrayfields[
'd.ref'][
'checked'])) {
1090 print_liste_field_titre($arrayfields[
'd.ref'][
'label'], $_SERVER[
"PHP_SELF"],
'd.ref',
'', $param,
'', $sortfield, $sortorder);
1091 $totalarray[
'nbfield']++;
1093if (!empty($arrayfields[
'd.civility'][
'checked'])) {
1094 print_liste_field_titre($arrayfields[
'd.civility'][
'label'], $_SERVER[
"PHP_SELF"],
'd.civility',
'', $param,
'', $sortfield, $sortorder);
1095 $totalarray[
'nbfield']++;
1097if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
1098 print_liste_field_titre($arrayfields[
'd.firstname'][
'label'], $_SERVER[
"PHP_SELF"],
'd.firstname',
'', $param,
'', $sortfield, $sortorder);
1099 $totalarray[
'nbfield']++;
1101if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
1102 print_liste_field_titre($arrayfields[
'd.lastname'][
'label'], $_SERVER[
"PHP_SELF"],
'd.lastname',
'', $param,
'', $sortfield, $sortorder);
1103 $totalarray[
'nbfield']++;
1105if (!empty($arrayfields[
'd.gender'][
'checked'])) {
1106 print_liste_field_titre($arrayfields[
'd.gender'][
'label'], $_SERVER[
'PHP_SELF'],
'd.gender', $param,
"",
"", $sortfield, $sortorder);
1107 $totalarray[
'nbfield']++;
1109if (!empty($arrayfields[
'd.company'][
'checked'])) {
1110 print_liste_field_titre($arrayfields[
'd.company'][
'label'], $_SERVER[
"PHP_SELF"],
'companyname',
'', $param,
'', $sortfield, $sortorder);
1111 $totalarray[
'nbfield']++;
1113if (!empty($arrayfields[
'd.login'][
'checked'])) {
1114 print_liste_field_titre($arrayfields[
'd.login'][
'label'], $_SERVER[
"PHP_SELF"],
'd.login',
'', $param,
'', $sortfield, $sortorder);
1115 $totalarray[
'nbfield']++;
1117if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
1118 print_liste_field_titre($arrayfields[
'd.morphy'][
'label'], $_SERVER[
"PHP_SELF"],
'd.morphy',
'', $param,
'', $sortfield, $sortorder);
1119 $totalarray[
'nbfield']++;
1121if (!empty($arrayfields[
't.libelle'][
'checked'])) {
1122 print_liste_field_titre($arrayfields[
't.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
't.libelle',
'', $param,
'', $sortfield, $sortorder);
1123 $totalarray[
'nbfield']++;
1125if (!empty($arrayfields[
'd.address'][
'checked'])) {
1126 print_liste_field_titre($arrayfields[
'd.address'][
'label'], $_SERVER[
"PHP_SELF"],
'd.address',
'', $param,
'', $sortfield, $sortorder);
1127 $totalarray[
'nbfield']++;
1129if (!empty($arrayfields[
'd.zip'][
'checked'])) {
1130 print_liste_field_titre($arrayfields[
'd.zip'][
'label'], $_SERVER[
"PHP_SELF"],
'd.zip',
'', $param,
'', $sortfield, $sortorder);
1131 $totalarray[
'nbfield']++;
1133if (!empty($arrayfields[
'd.town'][
'checked'])) {
1134 print_liste_field_titre($arrayfields[
'd.town'][
'label'], $_SERVER[
"PHP_SELF"],
'd.town',
'', $param,
'', $sortfield, $sortorder);
1135 $totalarray[
'nbfield']++;
1137if (!empty($arrayfields[
'state.nom'][
'checked'])) {
1138 print_liste_field_titre($arrayfields[
'state.nom'][
'label'], $_SERVER[
"PHP_SELF"],
"state.nom",
"", $param,
'', $sortfield, $sortorder);
1139 $totalarray[
'nbfield']++;
1141if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
1142 print_liste_field_titre($arrayfields[
'country.code_iso'][
'label'], $_SERVER[
"PHP_SELF"],
"country.code_iso",
"", $param,
'', $sortfield, $sortorder,
'center ');
1143 $totalarray[
'nbfield']++;
1145if (!empty($arrayfields[
'd.phone'][
'checked'])) {
1146 print_liste_field_titre($arrayfields[
'd.phone'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone',
'', $param,
'', $sortfield, $sortorder);
1147 $totalarray[
'nbfield']++;
1149if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
1150 print_liste_field_titre($arrayfields[
'd.phone_perso'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone_perso',
'', $param,
'', $sortfield, $sortorder);
1151 $totalarray[
'nbfield']++;
1153if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
1154 print_liste_field_titre($arrayfields[
'd.phone_mobile'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone_mobile',
'', $param,
'', $sortfield, $sortorder);
1155 $totalarray[
'nbfield']++;
1157if (!empty($arrayfields[
'd.email'][
'checked'])) {
1158 print_liste_field_titre($arrayfields[
'd.email'][
'label'], $_SERVER[
"PHP_SELF"],
'd.email',
'', $param,
'', $sortfield, $sortorder);
1159 $totalarray[
'nbfield']++;
1161if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
1162 print_liste_field_titre($arrayfields[
'd.datefin'][
'label'], $_SERVER[
"PHP_SELF"],
'd.datefin,t.subscription',
'', $param,
'', $sortfield, $sortorder,
'center ');
1163 $totalarray[
'nbfield']++;
1166include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
1169$parameters = array(
'arrayfields' => $arrayfields,
'totalarray' => &$totalarray,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder);
1170$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
1171print $hookmanager->resPrint;
1173if (!empty($arrayfields[
'd.datec'][
'checked'])) {
1174 print_liste_field_titre($arrayfields[
'd.datec'][
'label'], $_SERVER[
"PHP_SELF"],
"d.datec",
"", $param,
'', $sortfield, $sortorder,
'center nowrap ');
1175 $totalarray[
'nbfield']++;
1177if (!empty($arrayfields[
'd.birth'][
'checked'])) {
1178 print_liste_field_titre($arrayfields[
'd.birth'][
'label'], $_SERVER[
"PHP_SELF"],
"d.birth",
"", $param,
'', $sortfield, $sortorder,
'center nowrap ');
1179 $totalarray[
'nbfield']++;
1181if (!empty($arrayfields[
'd.tms'][
'checked'])) {
1182 print_liste_field_titre($arrayfields[
'd.tms'][
'label'], $_SERVER[
"PHP_SELF"],
"d.tms",
"", $param,
'', $sortfield, $sortorder,
'center nowrap ');
1183 $totalarray[
'nbfield']++;
1185if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
1186 print_liste_field_titre($arrayfields[
'd.import_key'][
'label'], $_SERVER[
"PHP_SELF"],
"d.import_key",
"", $param,
'', $sortfield, $sortorder,
'center ');
1187 $totalarray[
'nbfield']++;
1189if (!empty($arrayfields[
'd.statut'][
'checked'])) {
1190 print_liste_field_titre($arrayfields[
'd.statut'][
'label'], $_SERVER[
"PHP_SELF"],
"d.statut,t.subscription,d.datefin",
"", $param,
'', $sortfield, $sortorder,
'center ');
1191 $totalarray[
'nbfield']++;
1194 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'maxwidthsearch center ');
1195 $totalarray[
'nbfield']++;
1202$savnbfield = $totalarray[
'nbfield'];
1203$totalarray = array();
1204$totalarray[
'nbfield'] = 0;
1205$imaxinloop = ($limit ? min($num, $limit) : $num);
1206while ($i < $imaxinloop) {
1207 $obj = $db->fetch_object($resql);
1212 $datefin = $db->jdate($obj->datefin);
1214 $memberstatic->id = $obj->rowid;
1215 $memberstatic->ref = $obj->ref;
1216 $memberstatic->civility_code = $obj->civility;
1217 $memberstatic->login = $obj->login;
1218 $memberstatic->lastname = $obj->lastname;
1219 $memberstatic->firstname = $obj->firstname;
1220 $memberstatic->gender = $obj->gender;
1221 $memberstatic->status = $obj->status;
1222 $memberstatic->datefin = $datefin;
1223 $memberstatic->socid = $obj->fk_soc;
1224 $memberstatic->photo = $obj->photo;
1225 $memberstatic->email = $obj->email;
1226 $memberstatic->morphy = $obj->morphy;
1227 $memberstatic->note_public = $obj->note_public;
1228 $memberstatic->note_private = $obj->note_private;
1229 $memberstatic->need_subscription = $obj->subscription;
1231 if (!empty($obj->fk_soc)) {
1232 $memberstatic->fetch_thirdparty();
1233 if ($memberstatic->thirdparty->id > 0) {
1234 $companyname = $memberstatic->thirdparty->name;
1235 $companynametoshow = $memberstatic->thirdparty->getNomUrl(1);
1238 $companyname = $obj->company;
1239 $companynametoshow = $obj->company;
1241 $memberstatic->company = $companyname;
1245 if ($mode ==
'kanban') {
1247 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
1248 print
'<div class="box-flex-container kanban">';
1250 $membertypestatic->id = $obj->type_id;
1251 $membertypestatic->label = $obj->type;
1253 $memberstatic->type = $membertypestatic->label;
1254 $memberstatic->photo = $obj->photo;
1257 print $memberstatic->getKanbanView(
'', array(
'selected' => in_array(
$object->id, $arrayofselected)));
1258 if ($i == (min($num, $limit) - 1)) {
1265 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
1269 print
'<td class="nowrap center">';
1270 if ($massactionbutton || $massaction) {
1272 if (in_array($obj->rowid, $arrayofselected)) {
1275 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1279 $totalarray[
'nbfield']++;
1283 if (!empty($arrayfields[
'd.rowid'][
'checked'])) {
1284 print
'<td class="center" data-key="id">'.$obj->rowid.
'</td>';
1286 $totalarray[
'nbfield']++;
1290 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
1292 print $memberstatic->getNomUrl(-1, 0,
'card',
'ref',
'', -1, 0, 1);
1295 $totalarray[
'nbfield']++;
1299 if (!empty($arrayfields[
'd.civility'][
'checked'])) {
1304 $totalarray[
'nbfield']++;
1308 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
1309 print
'<td class="tdoverflowmax125" title="'.dol_escape_htmltag($obj->firstname).
'">';
1310 print $memberstatic->getNomUrl(0, 0,
'card',
'firstname');
1314 $totalarray[
'nbfield']++;
1318 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
1319 print
'<td class="tdoverflowmax125" title="'.dol_escape_htmltag($obj->lastname).
'">';
1320 print $memberstatic->getNomUrl(0, 0,
'card',
'lastname');
1324 $totalarray[
'nbfield']++;
1328 if (!empty($arrayfields[
'd.gender'][
'checked'])) {
1331 print $langs->trans(
"Gender".$obj->gender);
1335 $totalarray[
'nbfield']++;
1339 if (!empty($arrayfields[
'd.company'][
'checked'])) {
1340 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($companyname).
'">';
1341 print $companynametoshow;
1345 if (!empty($arrayfields[
'd.login'][
'checked'])) {
1346 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->login).
'">'.$obj->login.
"</td>\n";
1348 $totalarray[
'nbfield']++;
1352 if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
1353 print
'<td class="center">';
1354 print $memberstatic->getmorphylib(
'', 2);
1357 $totalarray[
'nbfield']++;
1361 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
1362 $membertypestatic->id = $obj->type_id;
1363 $membertypestatic->label = $obj->type;
1364 print
'<td class="nowraponall">';
1365 print $membertypestatic->getNomUrl(1, 32);
1368 $totalarray[
'nbfield']++;
1372 if (!empty($arrayfields[
'd.address'][
'checked'])) {
1373 print
'<td class="nocellnopadd tdoverflowmax200" title="'.dol_escape_htmltag($obj->address).
'">';
1377 $totalarray[
'nbfield']++;
1381 if (!empty($arrayfields[
'd.zip'][
'checked'])) {
1382 print
'<td class="nocellnopadd">';
1386 $totalarray[
'nbfield']++;
1390 if (!empty($arrayfields[
'd.town'][
'checked'])) {
1391 print
'<td class="nocellnopadd">';
1395 $totalarray[
'nbfield']++;
1399 if (!empty($arrayfields[
'state.nom'][
'checked'])) {
1404 $totalarray[
'nbfield']++;
1408 if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
1409 $tmparray =
getCountry($obj->country,
'all');
1410 print
'<td class="center tdoverflowmax100" title="'.dol_escape_htmltag($tmparray[
'label']).
'">';
1414 $totalarray[
'nbfield']++;
1418 if (!empty($arrayfields[
'd.phone'][
'checked'])) {
1419 print
'<td class="nocellnopadd">';
1423 $totalarray[
'nbfield']++;
1427 if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
1428 print
'<td class="nocellnopadd">';
1432 $totalarray[
'nbfield']++;
1436 if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
1437 print
'<td class="nocellnopadd">';
1441 $totalarray[
'nbfield']++;
1445 if (!empty($arrayfields[
'd.email'][
'checked'])) {
1446 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->email).
'">';
1450 $totalarray[
'nbfield']++;
1454 $datefin = $db->jdate($obj->datefin);
1455 if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
1459 if ($memberstatic->hasDelay()) {
1460 $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").
')';
1461 $s .=
" ".img_warning($langs->trans(
"SubscriptionLate").$textlate);
1464 if (!empty($obj->subscription)) {
1465 $s .=
'<span class="opacitymedium">'.$langs->trans(
"SubscriptionNotReceived").
'</span>';
1466 if ($obj->status > 0) {
1467 $s .=
" ".img_warning();
1470 $s .=
'<span class="opacitymedium">'.$langs->trans(
"SubscriptionNotNeeded").
'</span>';
1473 print
'<td class="nowraponall center tdoverflowmax150" title="'.dolPrintHTMLForAttribute(
dol_string_nohtmltag($s)).
'">';
1477 $totalarray[
'nbfield']++;
1481 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1483 $parameters = array(
'arrayfields' => $arrayfields,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
1484 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
1485 print $hookmanager->resPrint;
1487 if (!empty($arrayfields[
'd.datec'][
'checked'])) {
1488 print
'<td class="nowrap center">';
1489 print
dol_print_date($db->jdate($obj->date_creation),
'dayhour',
'tzuser');
1492 $totalarray[
'nbfield']++;
1496 if (!empty($arrayfields[
'd.birth'][
'checked'])) {
1497 print
'<td class="nowrap center">';
1501 $totalarray[
'nbfield']++;
1505 if (!empty($arrayfields[
'd.tms'][
'checked'])) {
1506 print
'<td class="nowrap center">';
1507 print
dol_print_date($db->jdate($obj->date_modification),
'dayhour',
'tzuser');
1510 $totalarray[
'nbfield']++;
1514 if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
1515 print
'<td class="tdoverflowmax100 center" title="'.dol_escape_htmltag($obj->import_key).
'">';
1519 $totalarray[
'nbfield']++;
1523 if (!empty($arrayfields[
'd.statut'][
'checked'])) {
1524 print
'<td class="nowrap center">';
1525 print $memberstatic->LibStatut($obj->status, $obj->subscription, $datefin, 5);
1528 $totalarray[
'nbfield']++;
1533 print
'<td class="center">';
1534 if ($massactionbutton || $massaction) {
1536 if (in_array($obj->rowid, $arrayofselected)) {
1539 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1543 $totalarray[
'nbfield']++;
1553include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1559 foreach ($arrayfields as $key => $val) {
1560 if (!empty($val[
'checked'])) {
1564 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
1569$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
1570$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
1571print $hookmanager->resPrint;
1573print
'</table>'.
"\n";
1576print
'</form>'.
"\n";
1578if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
1579 $hidegeneratedfilelistifempty = 1;
1580 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
1581 $hidegeneratedfilelistifempty = 0;
1584 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
1588 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
1589 $urlsource .= str_replace(
'&',
'&', $param);
1591 $filedir = $diroutputmassaction;
1592 $genallowed = $permissiontoread;
1593 $delallowed = $permissiontoadd;
1595 print $formfile->showdocuments(
'massfilesarea_'.
$object->module,
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'',
null, $hidegeneratedfilelistifempty);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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=null, $outputlangs=null, $entconv=1, $searchlabel='')
Return country label, code or id from an id, code or label.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
dol_print_phone($phone, $countrycode='', $cid=0, $socid=0, $addlink='', $separ=" ", $withpicto='', $titlealt='', $adddivfloat=0, $morecss='')
Format phone numbers according to country.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
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 a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
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.
print_barre_liste($title, $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.
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.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return 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.