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',
148 'd.ref'=>array(
'label'=>
"Ref",
'checked'=>1),
149 'd.civility'=>array(
'label'=>
"Civility",
'checked'=>0),
150 'd.lastname'=>array(
'label'=>
"Lastname",
'checked'=>1),
151 'd.firstname'=>array(
'label'=>
"Firstname",
'checked'=>1),
152 'd.gender'=>array(
'label'=>
"Gender",
'checked'=>0),
153 'd.company'=>array(
'label'=>
"Company",
'checked'=>1,
'position'=>70),
154 'd.login'=>array(
'label'=>
"Login",
'checked'=>1),
155 'd.morphy'=>array(
'label'=>
"MemberNature",
'checked'=>1),
156 't.libelle'=>array(
'label'=>
"Type",
'checked'=>1,
'position'=>55),
157 'd.address'=>array(
'label'=>
"Address",
'checked'=>0),
158 'd.zip'=>array(
'label'=>
"Zip",
'checked'=>0),
159 'd.town'=>array(
'label'=>
"Town",
'checked'=>0),
160 'd.phone'=>array(
'label'=>
"Phone",
'checked'=>0),
161 'd.phone_perso'=>array(
'label'=>
"PhonePerso",
'checked'=>0),
162 'd.phone_mobile'=>array(
'label'=>
"PhoneMobile",
'checked'=>0),
163 'd.email'=>array(
'label'=>
"Email",
'checked'=>1),
164 'state.nom'=>array(
'label'=>
"State",
'checked'=>0,
'position'=>90),
165 'country.code_iso'=>array(
'label'=>
"Country",
'checked'=>0,
'position'=>95),
168 'd.datefin'=>array(
'label'=>
"EndSubscription"),
169 'd.datec'=>array(
'label'=>
"DateCreation"),
170 'd.birth'=>array(
'label'=>
"Birthday"),
171 'd.tms'=>array(
'label'=>
"DateModificationShort"),
172 'd.statut'=>array(
'label'=>
"Status"),
173 'd.import_key'=>array(
'label'=>
"ImportId"),
177include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
184foreach ($object->fields as $key => $val) {
185 if (!array_key_exists($tableprefix.
'.'.$key, $arrayfields)) {
190 if (!empty($val[
'visible'])) {
191 $visible = (int)
dol_eval($val[
'visible'], 1);
192 $arrayfields[$tableprefix.
'.'.$key] = array(
193 'label'=>$val[
'label'],
194 'checked'=>(($visible < 0) ? 0 : 1),
195 'enabled'=>
dol_eval($val[
'enabled'], 1),
196 'position'=>$val[
'position'],
197 'help'=> isset($val[
'help']) ? $val[
'help'] :
''
212if (
GETPOST(
'cancel',
'alpha')) {
216if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
220$parameters = array(
'socid'=>isset($socid) ? $socid : null);
221$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
226if (empty($reshook)) {
228 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
231 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
237 $search_lastname =
"";
238 $search_firstname =
"";
240 $search_civility =
"";
242 $search_company =
"";
245 $search_address =
"";
249 $search_country =
'';
251 $search_phone_perso =
'';
252 $search_phone_mobile =
'';
257 $search_import_key =
'';
261 $search_array_options = array();
265 if ($massaction ==
'close' && $user->hasRight(
'adherent',
'creer')) {
272 foreach ($toselect as $idtoclose) {
273 $tmpmember->fetch($idtoclose);
274 $result = $tmpmember->resiliate($user);
276 if ($result < 0 && !count($tmpmember->errors)) {
295 if ($massaction ==
'createexternaluser' && $user->hasRight(
'adherent',
'creer') && $user->hasRight(
'user',
'user',
'creer')) {
302 foreach ($toselect as $idtoclose) {
303 $tmpmember->fetch($idtoclose);
305 if (!empty($tmpmember->fk_soc)) {
306 $nuser =
new User($db);
309 $result = $nuser->create_from_member($tmpuser, $tmpmember->login);
311 if ($result < 0 && !count($tmpmember->errors)) {
322 setEventMessages($langs->trans(
"XExternalUserCreated", $nbcreated),
null,
'mesgs');
331 $objectclass =
'Adherent';
332 $objectlabel =
'Members';
333 $permissiontoread = $user->hasRight(
'adherent',
'lire');
334 $permissiontodelete = $user->hasRight(
'adherent',
'supprimer');
335 $permissiontoadd = $user->hasRight(
'adherent',
'creer');
336 $uploaddir = $conf->adherent->dir_output;
337 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
345$form =
new Form($db);
353$title = $langs->trans(
"Members").
" - ".$langs->trans(
"List");
354$help_url =
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
361if ((!empty($search_categ) && $search_categ > 0) || !empty($catid)) {
362 $sql =
"SELECT DISTINCT";
366$sql .=
" d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,";
367$sql .=
" d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
368$sql .=
" d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,";
369$sql .=
" d.fk_adherent_type as type_id, d.morphy, d.statut as status, d.datec as date_creation, d.tms as date_update,";
370$sql .=
" d.note_private, d.note_public, d.import_key,";
372$sql .=
" ".$db->ifsql(
"d.societe IS NULL",
"s.nom",
"d.societe").
" as companyname,";
373$sql .=
" t.libelle as type, t.subscription,";
374$sql .=
" state.code_departement as state_code, state.nom as state_name";
377if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
378 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
379 $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
384$parameters = array();
385$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
386$sql .= $hookmanager->resPrint;
387$sql = preg_replace(
'/,\s*$/',
'', $sql);
392$sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent as d";
393if (!empty($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) {
394 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (d.rowid = ef.fk_object)";
396$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as country on (country.rowid = d.country)";
397$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_departements as state on (state.rowid = d.state_id)";
398$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe as s on (s.rowid = d.fk_soc)";
401$sql .=
", ".MAIN_DB_PREFIX.
"adherent_type as t";
402$sql .=
" WHERE d.fk_adherent_type = t.rowid";
404if ($catid && empty($search_categ)) {
405 $search_categ = $catid;
408$searchCategoryContactList = $search_categ ? array($search_categ) : array();
409$searchCategoryContactOperator = 0;
411if (!empty($searchCategoryContactList)) {
412 $searchCategoryContactSqlList = array();
413 $listofcategoryid =
'';
414 foreach ($searchCategoryContactList as $searchCategoryContact) {
415 if (intval($searchCategoryContact) == -2) {
416 $searchCategoryContactSqlList[] =
"NOT EXISTS (SELECT ck.fk_categorie FROM ".MAIN_DB_PREFIX.
"categorie_member as ck WHERE d.rowid = ck.fk_member)";
417 } elseif (intval($searchCategoryContact) > 0) {
418 if ($searchCategoryContactOperator == 0) {
419 $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).
")";
421 $listofcategoryid .= ($listofcategoryid ?
', ' :
'') .((
int) $searchCategoryContact);
425 if ($listofcategoryid) {
426 $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).
"))";
428 if ($searchCategoryContactOperator == 1) {
429 if (!empty($searchCategoryContactSqlList)) {
430 $sql .=
" AND (".implode(
' OR ', $searchCategoryContactSqlList).
")";
433 if (!empty($searchCategoryContactSqlList)) {
434 $sql .=
" AND (".implode(
' AND ', $searchCategoryContactSqlList).
")";
439$sql .=
" AND d.entity IN (".getEntity(
'adherent').
")";
441 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
443if ($search_type > 0) {
444 $sql .=
" AND t.rowid=".((int) $search_type);
446if ($search_filter ==
'withoutsubscription') {
447 $sql .=
" AND (datefin IS NULL)";
449if ($search_filter ==
'waitingsubscription') {
450 $sql .=
" AND (datefin IS NULL AND t.subscription = '1')";
452if ($search_filter ==
'uptodate') {
453 $sql .=
" AND (datefin >= '".$db->idate($now).
"' OR (datefin IS NULL AND t.subscription = '0'))";
455if ($search_filter ==
'outofdate') {
456 $sql .=
" AND (datefin < '".$db->idate($now).
"')";
458if ($search_status !=
'') {
460 $sql .=
" AND d.statut in (".$db->sanitize($db->escape($search_status)).
")";
462if ($search_morphy !=
'' && $search_morphy !=
'-1') {
468if ($search_civility) {
471if ($search_firstname) {
474if ($search_lastname) {
475 $sql .=
natural_search(array(
"d.firstname",
"d.lastname",
"d.societe"), $search_lastname);
477if ($search_gender !=
'' && $search_gender !=
'-1') {
483if ($search_company) {
489if ($search_address) {
504if ($search_phone_perso) {
507if ($search_phone_mobile) {
510if ($search_country) {
511 $sql .=
" AND d.country IN (".$db->sanitize($search_country).
')';
513if ($search_import_key) {
517include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
519$parameters = array();
520$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
521$sql .= $hookmanager->resPrint;
524$nbtotalofrecords =
'';
527 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
528 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
529 $resql = $db->query($sqlforcount);
531 $objforcount = $db->fetch_object($resql);
532 $nbtotalofrecords = $objforcount->nbtotalofrecords;
537 if (($page * $limit) > $nbtotalofrecords) {
546$sql .= $db->order($sortfield, $sortorder);
548 $sql .= $db->plimit($limit + 1, $offset);
551$resql = $db->query($sql);
557$num = $db->num_rows($resql);
561if ($num == 1 &&
getDolGlobalString(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
562 $obj = $db->fetch_object($resql);
564 header(
"Location: ".DOL_URL_ROOT.
'/adherents/card.php?id='.$id);
571llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'bodyforlist');
573$arrayofselected = is_array($toselect) ? $toselect : array();
576if ($search_type > 0) {
578 $result = $membertype->fetch($search_type);
579 $title .=
" (".$membertype->label.
")";
585 $param .=
'&mode='.urlencode($mode);
587if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
588 $param .=
'&contextpage='.urlencode($contextpage);
590if ($limit > 0 && $limit != $conf->liste_limit) {
591 $param .=
'&limit='.((int) $limit);
593if ($optioncss !=
'') {
594 $param .=
'&optioncss='.urlencode($optioncss);
596if ($search_all !=
"") {
597 $param .=
"&search_all=".urlencode($search_all);
600 $param .=
"&search_ref=".urlencode($search_ref);
602if ($search_civility) {
603 $param .=
"&search_civility=".urlencode($search_civility);
605if ($search_firstname) {
606 $param .=
"&search_firstname=".urlencode($search_firstname);
608if ($search_lastname) {
609 $param .=
"&search_lastname=".urlencode($search_lastname);
612 $param .=
"&search_gender=".urlencode($search_gender);
615 $param .=
"&search_login=".urlencode($search_login);
618 $param .=
"&search_email=".urlencode($search_email);
620if ($search_categ > 0 || $search_categ == -2) {
621 $param .=
"&search_categ=".urlencode($search_categ);
623if ($search_company) {
624 $param .=
"&search_company=".urlencode($search_company);
626if ($search_address !=
'') {
627 $param .=
"&search_address=".urlencode($search_address);
629if ($search_town !=
'') {
630 $param .=
"&search_town=".urlencode($search_town);
632if ($search_zip !=
'') {
633 $param .=
"&search_zip=".urlencode($search_zip);
635if ($search_state !=
'') {
636 $param .=
"&search_state=".urlencode($search_state);
638if ($search_country !=
'') {
639 $param .=
"&search_country=".urlencode($search_country);
641if ($search_phone !=
'') {
642 $param .=
"&search_phone=".urlencode($search_phone);
644if ($search_phone_perso !=
'') {
645 $param .=
"&search_phone_perso=".urlencode($search_phone_perso);
647if ($search_phone_mobile !=
'') {
648 $param .=
"&search_phone_mobile=".urlencode($search_phone_mobile);
650if ($search_filter && $search_filter !=
'-1') {
651 $param .=
"&search_filter=".urlencode($search_filter);
653if ($search_status !=
"" && $search_status != -3) {
654 $param .=
"&search_status=".urlencode($search_status);
656if ($search_import_key !=
'') {
657 $param .=
'&search_import_key='.urlencode($search_import_key);
659if ($search_type > 0) {
660 $param .=
"&search_type=".urlencode($search_type);
664include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
667$arrayofmassactions = array(
671if ($user->hasRight(
'adherent',
'creer')) {
672 $arrayofmassactions[
'close'] =
img_picto(
'',
'close_title',
'class="pictofixedwidth"').$langs->trans(
"Resiliate");
674if ($user->hasRight(
'adherent',
'supprimer')) {
675 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
677if (isModEnabled(
'category') && $user->hasRight(
'adherent',
'creer')) {
678 $arrayofmassactions[
'preaffecttag'] =
img_picto(
'',
'category',
'class="pictofixedwidth"').$langs->trans(
"AffectTag");
680if ($user->hasRight(
'adherent',
'creer') && $user->hasRight(
'user',
'user',
'creer')) {
681 $arrayofmassactions[
'createexternaluser'] =
img_picto(
'',
'user',
'class="pictofixedwidth"').$langs->trans(
"CreateExternalUser");
683if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete',
'preaffecttag'))) {
684 $arrayofmassactions = array();
686$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
688print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
689if ($optioncss !=
'') {
690 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
692print
'<input type="hidden" name="token" value="'.newToken().
'">';
693print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
694print
'<input type="hidden" name="action" value="list">';
695print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
696print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
697print
'<input type="hidden" name="page" value="'.$page.
'">';
698print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
699print
'<input type="hidden" name="page_y" value="">';
700print
'<input type="hidden" name="mode" value="'.$mode.
'">';
704$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'));
705$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'));
706if ($user->hasRight(
'adherent',
'creer')) {
708 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewMember'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/adherents/card.php?action=create');
711print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
713$topicmail =
"Information";
714$modelmail =
"member";
716$trackid =
'mem'.$object->id;
717include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
721 foreach ($fieldstosearchall as $key => $val) {
722 $fieldstosearchall[$key] = $langs->trans($val);
723 $setupstring .= $key.
"=".$val.
";";
725 print
'<!-- Search done like if MYOBJECT_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
726 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>'.
"\n";
731if (isModEnabled(
'categorie') && $user->hasRight(
'categorie',
'lire')) {
732 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
733 $moreforfilter .=
'<div class="divsearchfield">';
734 $moreforfilter .=
img_picto($langs->trans(
'Categories'),
'category',
'class="pictofixedwidth"').$formother->select_categories(Categorie::TYPE_MEMBER, $search_categ,
'search_categ', 1, $langs->trans(
"MembersCategoriesShort"));
735 $moreforfilter .=
'</div>';
737$parameters = array();
738$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
739if (empty($reshook)) {
740 $moreforfilter .= $hookmanager->resPrint;
742 $moreforfilter = $hookmanager->resPrint;
744if (!empty($moreforfilter)) {
745 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
746 print $moreforfilter;
747 $parameters = array();
748 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
749 print $hookmanager->resPrint;
753$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
754$selectedfields = ($mode !=
'kanban' ? $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN',
'')) :
'');
755$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
757print
'<div class="div-table-responsive">';
758print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
762print
'<tr class="liste_titre_filter">';
766 print
'<td class="liste_titre center maxwidthsearch">';
767 $searchpicto = $form->showFilterButtons(
'left');
774 print
'<td class="liste_titre"> </td>';
778if (!empty($arrayfields[
'd.ref'][
'checked'])) {
779 print
'<td class="liste_titre">';
780 print
'<input type="text" class="flat maxwidth75imp" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
785if (!empty($arrayfields[
'd.civility'][
'checked'])) {
786 print
'<td class="liste_titre left">';
787 print
'<input class="flat maxwidth50imp" type="text" name="search_civility" value="'.dol_escape_htmltag($search_civility).
'"></td>';
791if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
792 print
'<td class="liste_titre left">';
793 print
'<input class="flat maxwidth75imp" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).
'"></td>';
797if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
798 print
'<td class="liste_titre left">';
799 print
'<input class="flat maxwidth75imp" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).
'"></td>';
803if (!empty($arrayfields[
'd.gender'][
'checked'])) {
804 print
'<td class="liste_titre">';
805 $arraygender = array(
'man'=>$langs->trans(
"Genderman"),
'woman'=>$langs->trans(
"Genderwoman"),
'other'=>$langs->trans(
"Genderother"));
806 print $form->selectarray(
'search_gender', $arraygender, $search_gender, 1);
811if (!empty($arrayfields[
'd.company'][
'checked'])) {
812 print
'<td class="liste_titre left">';
813 print
'<input class="flat maxwidth75imp" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).
'"></td>';
817if (!empty($arrayfields[
'd.login'][
'checked'])) {
818 print
'<td class="liste_titre left">';
819 print
'<input class="flat maxwidth75imp" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).
'"></td>';
823if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
824 print
'<td class="liste_titre center">';
825 $arraymorphy = array(
'mor'=>$langs->trans(
"Moral"),
'phy'=>$langs->trans(
"Physical"));
826 print $form->selectarray(
'search_morphy', $arraymorphy, $search_morphy, 1, 0, 0,
'', 0, 0, 0,
'',
'maxwidth100');
831if (!empty($arrayfields[
't.libelle'][
'checked'])) {
834if (!empty($arrayfields[
't.libelle'][
'checked'])) {
835 print
'<td class="liste_titre">';
836 $listetype = $membertypestatic->liste_array();
837 print $form->selectarray(
"search_type", $listetype, $search_type, 1, 0, 0,
'', 0, 32);
842if (!empty($arrayfields[
'd.address'][
'checked'])) {
843 print
'<td class="liste_titre left">';
844 print
'<input class="flat maxwidth75imp" type="text" name="search_address" value="'.dol_escape_htmltag($search_address).
'"></td>';
848if (!empty($arrayfields[
'd.zip'][
'checked'])) {
849 print
'<td class="liste_titre left">';
850 print
'<input class="flat maxwidth50imp" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).
'"></td>';
854if (!empty($arrayfields[
'd.town'][
'checked'])) {
855 print
'<td class="liste_titre left">';
856 print
'<input class="flat maxwidth75imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).
'"></td>';
860if (!empty($arrayfields[
'state.nom'][
'checked'])) {
861 print
'<td class="liste_titre">';
862 print
'<input class="flat searchstring maxwidth75imp" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).
'">';
867if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
868 print
'<td class="liste_titre center">';
869 print $form->select_country($search_country,
'search_country',
'', 0,
'minwidth100imp maxwidth100');
874if (!empty($arrayfields[
'd.phone'][
'checked'])) {
875 print
'<td class="liste_titre left">';
876 print
'<input class="flat maxwidth75imp" type="text" name="search_phone" value="'.dol_escape_htmltag($search_phone).
'"></td>';
880if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
881 print
'<td class="liste_titre left">';
882 print
'<input class="flat maxwidth75imp" type="text" name="search_phone_perso" value="'.dol_escape_htmltag($search_phone_perso).
'"></td>';
886if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
887 print
'<td class="liste_titre left">';
888 print
'<input class="flat maxwidth75imp" type="text" name="search_phone_mobile" value="'.dol_escape_htmltag($search_phone_mobile).
'"></td>';
892if (!empty($arrayfields[
'd.email'][
'checked'])) {
893 print
'<td class="liste_titre left">';
894 print
'<input class="flat maxwidth75imp" type="text" name="search_email" value="'.dol_escape_htmltag($search_email).
'"></td>';
898if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
899 print
'<td class="liste_titre center">';
901 $selectarray = array(
'-1'=>
'',
'waitingsubscription'=>$langs->trans(
"WaitingSubscription"),
'uptodate'=>$langs->trans(
"UpToDate"),
'outofdate'=>$langs->trans(
"OutOfDate"));
902 print $form->selectarray(
'search_filter', $selectarray, $search_filter);
907include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
910$parameters = array(
'arrayfields'=>$arrayfields);
911$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
912print $hookmanager->resPrint;
915if (!empty($arrayfields[
'd.datec'][
'checked'])) {
916 print
'<td class="liste_titre">';
921if (!empty($arrayfields[
'd.birth'][
'checked'])) {
922 print
'<td class="liste_titre">';
927if (!empty($arrayfields[
'd.tms'][
'checked'])) {
928 print
'<td class="liste_titre">';
933if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
934 print
'<td class="liste_titre center">';
935 print
'<input class="flat searchstring maxwidth50" type="text" name="search_import_key" value="'.dol_escape_htmltag($search_import_key).
'">';
940if (!empty($arrayfields[
'd.statut'][
'checked'])) {
941 print
'<td class="liste_titre center parentonrightofpage">';
948 print $form->selectarray(
'search_status', $liststatus, $search_status, -3, 0, 0,
'', 0, 0, 0,
'',
'search_status width100 onrightofpage');
954 print
'<td class="liste_titre center maxwidthsearch">';
955 $searchpicto = $form->showFilterButtons();
961$totalarray = array();
962$totalarray[
'nbfield'] = 0;
966print
'<tr class="liste_titre">';
969 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch actioncolumn ');
970 $totalarray[
'nbfield']++;
974 $totalarray[
'nbfield']++;
976if (!empty($arrayfields[
'd.ref'][
'checked'])) {
977 print_liste_field_titre($arrayfields[
'd.ref'][
'label'], $_SERVER[
"PHP_SELF"],
'd.ref',
'', $param,
'', $sortfield, $sortorder);
978 $totalarray[
'nbfield']++;
980if (!empty($arrayfields[
'd.civility'][
'checked'])) {
981 print_liste_field_titre($arrayfields[
'd.civility'][
'label'], $_SERVER[
"PHP_SELF"],
'd.civility',
'', $param,
'', $sortfield, $sortorder);
982 $totalarray[
'nbfield']++;
984if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
985 print_liste_field_titre($arrayfields[
'd.firstname'][
'label'], $_SERVER[
"PHP_SELF"],
'd.firstname',
'', $param,
'', $sortfield, $sortorder);
986 $totalarray[
'nbfield']++;
988if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
989 print_liste_field_titre($arrayfields[
'd.lastname'][
'label'], $_SERVER[
"PHP_SELF"],
'd.lastname',
'', $param,
'', $sortfield, $sortorder);
990 $totalarray[
'nbfield']++;
992if (!empty($arrayfields[
'd.gender'][
'checked'])) {
993 print_liste_field_titre($arrayfields[
'd.gender'][
'label'], $_SERVER[
'PHP_SELF'],
'd.gender', $param,
"",
"", $sortfield, $sortorder);
994 $totalarray[
'nbfield']++;
996if (!empty($arrayfields[
'd.company'][
'checked'])) {
997 print_liste_field_titre($arrayfields[
'd.company'][
'label'], $_SERVER[
"PHP_SELF"],
'companyname',
'', $param,
'', $sortfield, $sortorder);
998 $totalarray[
'nbfield']++;
1000if (!empty($arrayfields[
'd.login'][
'checked'])) {
1001 print_liste_field_titre($arrayfields[
'd.login'][
'label'], $_SERVER[
"PHP_SELF"],
'd.login',
'', $param,
'', $sortfield, $sortorder);
1002 $totalarray[
'nbfield']++;
1004if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
1005 print_liste_field_titre($arrayfields[
'd.morphy'][
'label'], $_SERVER[
"PHP_SELF"],
'd.morphy',
'', $param,
'', $sortfield, $sortorder);
1006 $totalarray[
'nbfield']++;
1008if (!empty($arrayfields[
't.libelle'][
'checked'])) {
1009 print_liste_field_titre($arrayfields[
't.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
't.libelle',
'', $param,
'', $sortfield, $sortorder);
1010 $totalarray[
'nbfield']++;
1012if (!empty($arrayfields[
'd.address'][
'checked'])) {
1013 print_liste_field_titre($arrayfields[
'd.address'][
'label'], $_SERVER[
"PHP_SELF"],
'd.address',
'', $param,
'', $sortfield, $sortorder);
1014 $totalarray[
'nbfield']++;
1016if (!empty($arrayfields[
'd.zip'][
'checked'])) {
1017 print_liste_field_titre($arrayfields[
'd.zip'][
'label'], $_SERVER[
"PHP_SELF"],
'd.zip',
'', $param,
'', $sortfield, $sortorder);
1018 $totalarray[
'nbfield']++;
1020if (!empty($arrayfields[
'd.town'][
'checked'])) {
1021 print_liste_field_titre($arrayfields[
'd.town'][
'label'], $_SERVER[
"PHP_SELF"],
'd.town',
'', $param,
'', $sortfield, $sortorder);
1022 $totalarray[
'nbfield']++;
1024if (!empty($arrayfields[
'state.nom'][
'checked'])) {
1025 print_liste_field_titre($arrayfields[
'state.nom'][
'label'], $_SERVER[
"PHP_SELF"],
"state.nom",
"", $param,
'', $sortfield, $sortorder);
1026 $totalarray[
'nbfield']++;
1028if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
1029 print_liste_field_titre($arrayfields[
'country.code_iso'][
'label'], $_SERVER[
"PHP_SELF"],
"country.code_iso",
"", $param,
'', $sortfield, $sortorder,
'center ');
1030 $totalarray[
'nbfield']++;
1032if (!empty($arrayfields[
'd.phone'][
'checked'])) {
1033 print_liste_field_titre($arrayfields[
'd.phone'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone',
'', $param,
'', $sortfield, $sortorder);
1034 $totalarray[
'nbfield']++;
1036if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
1037 print_liste_field_titre($arrayfields[
'd.phone_perso'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone_perso',
'', $param,
'', $sortfield, $sortorder);
1038 $totalarray[
'nbfield']++;
1040if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
1041 print_liste_field_titre($arrayfields[
'd.phone_mobile'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone_mobile',
'', $param,
'', $sortfield, $sortorder);
1042 $totalarray[
'nbfield']++;
1044if (!empty($arrayfields[
'd.email'][
'checked'])) {
1045 print_liste_field_titre($arrayfields[
'd.email'][
'label'], $_SERVER[
"PHP_SELF"],
'd.email',
'', $param,
'', $sortfield, $sortorder);
1046 $totalarray[
'nbfield']++;
1048if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
1049 print_liste_field_titre($arrayfields[
'd.datefin'][
'label'], $_SERVER[
"PHP_SELF"],
'd.datefin,t.subscription',
'', $param,
'', $sortfield, $sortorder,
'center ');
1050 $totalarray[
'nbfield']++;
1053include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
1056$parameters = array(
'arrayfields'=>$arrayfields,
'totalarray'=>&$totalarray,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
1057$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
1058print $hookmanager->resPrint;
1060if (!empty($arrayfields[
'd.datec'][
'checked'])) {
1061 print_liste_field_titre($arrayfields[
'd.datec'][
'label'], $_SERVER[
"PHP_SELF"],
"d.datec",
"", $param,
'', $sortfield, $sortorder,
'center nowrap ');
1062 $totalarray[
'nbfield']++;
1064if (!empty($arrayfields[
'd.birth'][
'checked'])) {
1065 print_liste_field_titre($arrayfields[
'd.birth'][
'label'], $_SERVER[
"PHP_SELF"],
"d.birth",
"", $param,
'', $sortfield, $sortorder,
'center nowrap ');
1066 $totalarray[
'nbfield']++;
1068if (!empty($arrayfields[
'd.tms'][
'checked'])) {
1069 print_liste_field_titre($arrayfields[
'd.tms'][
'label'], $_SERVER[
"PHP_SELF"],
"d.tms",
"", $param,
'', $sortfield, $sortorder,
'center nowrap ');
1070 $totalarray[
'nbfield']++;
1072if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
1073 print_liste_field_titre($arrayfields[
'd.import_key'][
'label'], $_SERVER[
"PHP_SELF"],
"d.import_key",
"", $param,
'', $sortfield, $sortorder,
'center ');
1074 $totalarray[
'nbfield']++;
1076if (!empty($arrayfields[
'd.statut'][
'checked'])) {
1077 print_liste_field_titre($arrayfields[
'd.statut'][
'label'], $_SERVER[
"PHP_SELF"],
"d.statut,t.subscription,d.datefin",
"", $param,
'', $sortfield, $sortorder,
'center ');
1078 $totalarray[
'nbfield']++;
1081 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'maxwidthsearch center ');
1082 $totalarray[
'nbfield']++;
1089$savnbfield = $totalarray[
'nbfield'];
1090$totalarray = array();
1091$totalarray[
'nbfield'] = 0;
1092$imaxinloop = ($limit ? min($num, $limit) : $num);
1093while ($i < $imaxinloop) {
1094 $obj = $db->fetch_object($resql);
1099 $datefin = $db->jdate($obj->datefin);
1101 $memberstatic->id = $obj->rowid;
1102 $memberstatic->ref = $obj->ref;
1103 $memberstatic->civility_id = $obj->civility;
1104 $memberstatic->login = $obj->login;
1105 $memberstatic->lastname = $obj->lastname;
1106 $memberstatic->firstname = $obj->firstname;
1107 $memberstatic->gender = $obj->gender;
1108 $memberstatic->statut = $obj->status;
1109 $memberstatic->status = $obj->status;
1110 $memberstatic->datefin = $datefin;
1111 $memberstatic->socid = $obj->fk_soc;
1112 $memberstatic->photo = $obj->photo;
1113 $memberstatic->email = $obj->email;
1114 $memberstatic->morphy = $obj->morphy;
1115 $memberstatic->note_public = $obj->note_public;
1116 $memberstatic->note_private = $obj->note_private;
1117 $memberstatic->need_subscription = $obj->subscription;
1119 if (!empty($obj->fk_soc)) {
1120 $memberstatic->fetch_thirdparty();
1121 if ($memberstatic->thirdparty->id > 0) {
1122 $companyname = $memberstatic->thirdparty->name;
1123 $companynametoshow = $memberstatic->thirdparty->getNomUrl(1);
1126 $companyname = $obj->company;
1127 $companynametoshow = $obj->company;
1129 $memberstatic->company = $companyname;
1131 if ($mode ==
'kanban') {
1133 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
1134 print
'<div class="box-flex-container kanban">';
1136 $membertypestatic->id = $obj->type_id;
1137 $membertypestatic->label = $obj->type;
1138 $memberstatic->type = $membertypestatic->label;
1139 $memberstatic->photo = $obj->photo;
1141 print $memberstatic->getKanbanView(
'', array(
'selected' => in_array($object->id, $arrayofselected)));
1142 if ($i == (min($num, $limit) - 1)) {
1149 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
1153 print
'<td class="nowrap center">';
1154 if ($massactionbutton || $massaction) {
1156 if (in_array($obj->rowid, $arrayofselected)) {
1159 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1163 $totalarray[
'nbfield']++;
1168 print
'<td class="center" data-key="id">'.$obj->rowid.
'</td>';
1170 $totalarray[
'nbfield']++;
1174 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
1176 print $memberstatic->getNomUrl(-1, 0,
'card',
'ref',
'', -1, 0, 1);
1179 $totalarray[
'nbfield']++;
1183 if (!empty($arrayfields[
'd.civility'][
'checked'])) {
1185 print $obj->civility;
1188 $totalarray[
'nbfield']++;
1192 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
1193 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).
'">';
1194 print $memberstatic->getNomUrl(0, 0,
'card',
'firstname');
1198 $totalarray[
'nbfield']++;
1202 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
1203 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->lastname).
'">';
1204 print $memberstatic->getNomUrl(0, 0,
'card',
'lastname');
1208 $totalarray[
'nbfield']++;
1212 if (!empty($arrayfields[
'd.gender'][
'checked'])) {
1215 print $langs->trans(
"Gender".$obj->gender);
1219 $totalarray[
'nbfield']++;
1223 if (!empty($arrayfields[
'd.company'][
'checked'])) {
1224 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($companyname).
'">';
1225 print $companynametoshow;
1229 if (!empty($arrayfields[
'd.login'][
'checked'])) {
1230 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->login).
'">'.$obj->login.
"</td>\n";
1232 $totalarray[
'nbfield']++;
1236 if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
1237 print
'<td class="center">';
1238 print $memberstatic->getmorphylib(
'', 2);
1241 $totalarray[
'nbfield']++;
1245 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
1246 $membertypestatic->id = $obj->type_id;
1247 $membertypestatic->label = $obj->type;
1248 print
'<td class="nowraponall">';
1249 print $membertypestatic->getNomUrl(1, 32);
1252 $totalarray[
'nbfield']++;
1256 if (!empty($arrayfields[
'd.address'][
'checked'])) {
1257 print
'<td class="nocellnopadd tdoverflowmax200" title="'.dol_escape_htmltag($obj->address).
'">';
1258 print $obj->address;
1261 $totalarray[
'nbfield']++;
1265 if (!empty($arrayfields[
'd.zip'][
'checked'])) {
1266 print
'<td class="nocellnopadd">';
1270 $totalarray[
'nbfield']++;
1274 if (!empty($arrayfields[
'd.town'][
'checked'])) {
1275 print
'<td class="nocellnopadd">';
1279 $totalarray[
'nbfield']++;
1283 if (!empty($arrayfields[
'state.nom'][
'checked'])) {
1284 print
"<td>".$obj->state_name.
"</td>\n";
1286 $totalarray[
'nbfield']++;
1290 if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
1291 $tmparray =
getCountry($obj->country,
'all');
1292 print
'<td class="center tdoverflowmax100" title="'.dol_escape_htmltag($tmparray[
'label']).
'">';
1296 $totalarray[
'nbfield']++;
1300 if (!empty($arrayfields[
'd.phone'][
'checked'])) {
1301 print
'<td class="nocellnopadd">';
1305 $totalarray[
'nbfield']++;
1309 if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
1310 print
'<td class="nocellnopadd">';
1311 print $obj->phone_perso;
1314 $totalarray[
'nbfield']++;
1318 if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
1319 print
'<td class="nocellnopadd">';
1320 print $obj->phone_mobile;
1323 $totalarray[
'nbfield']++;
1327 if (!empty($arrayfields[
'd.email'][
'checked'])) {
1328 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->email).
'">';
1332 $totalarray[
'nbfield']++;
1336 $datefin = $db->jdate($obj->datefin);
1337 if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
1338 print
'<td class="nowraponall center">';
1341 if ($memberstatic->hasDelay()) {
1342 $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").
')';
1343 print
" ".img_warning($langs->trans(
"SubscriptionLate").$textlate);
1346 if (!empty($obj->subscription)) {
1347 print
'<span class="opacitymedium">'.$langs->trans(
"SubscriptionNotReceived").
'</span>';
1348 if ($obj->status > 0) {
1349 print
" ".img_warning();
1357 $totalarray[
'nbfield']++;
1361 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1363 $parameters = array(
'arrayfields'=>$arrayfields,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
1364 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
1365 print $hookmanager->resPrint;
1367 if (!empty($arrayfields[
'd.datec'][
'checked'])) {
1368 print
'<td class="nowrap center">';
1369 print
dol_print_date($db->jdate($obj->date_creation),
'dayhour',
'tzuser');
1372 $totalarray[
'nbfield']++;
1376 if (!empty($arrayfields[
'd.birth'][
'checked'])) {
1377 print
'<td class="nowrap center">';
1381 $totalarray[
'nbfield']++;
1385 if (!empty($arrayfields[
'd.tms'][
'checked'])) {
1386 print
'<td class="nowrap center">';
1387 print
dol_print_date($db->jdate($obj->date_update),
'dayhour',
'tzuser');
1390 $totalarray[
'nbfield']++;
1394 if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
1395 print
'<td class="tdoverflowmax100 center" title="'.dol_escape_htmltag($obj->import_key).
'">';
1399 $totalarray[
'nbfield']++;
1403 if (!empty($arrayfields[
'd.statut'][
'checked'])) {
1404 print
'<td class="nowrap center">';
1405 print $memberstatic->LibStatut($obj->status, $obj->subscription, $datefin, 5);
1408 $totalarray[
'nbfield']++;
1413 print
'<td class="center">';
1414 if ($massactionbutton || $massaction) {
1416 if (in_array($obj->rowid, $arrayofselected)) {
1419 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1423 $totalarray[
'nbfield']++;
1433include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1439 foreach ($arrayfields as $key => $val) {
1440 if (!empty($val[
'checked'])) {
1444 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
1449$parameters = array(
'arrayfields'=>$arrayfields,
'sql' => $sql);
1450$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
1451print $hookmanager->resPrint;
1453print
'</table>'.
"\n";
1456print
'</form>'.
"\n";
1458if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
1459 $hidegeneratedfilelistifempty = 1;
1460 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
1461 $hidegeneratedfilelistifempty = 0;
1464 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
1468 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
1469 $urlsource .= str_replace(
'&',
'&', $param);
1471 $filedir = $diroutputmassaction;
1472 $genallowed = $permissiontoread;
1473 $delallowed = $permissiontoadd;
1475 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 a 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_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
dol_clone($object, $native=0)
Create a clone of instance of object (new instance with same value for each properties) With native =...
dol_eval($s, $returnvalue=0, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
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.