32 require
'../main.inc.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
36 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
40 $langs->loadLangs(array(
"members",
"companies",
"categories"));
44 $action =
GETPOST(
'action',
'aZ09');
45 $massaction =
GETPOST(
'massaction',
'alpha');
46 $show_files =
GETPOST(
'show_files',
'int');
47 $confirm =
GETPOST(
'confirm',
'alpha');
48 $toselect =
GETPOST(
'toselect',
'array');
49 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'memberslist';
53 $search =
GETPOST(
"search",
'alpha');
54 $search_ref =
GETPOST(
"search_ref",
'alpha');
55 $search_lastname =
GETPOST(
"search_lastname",
'alpha');
56 $search_firstname =
GETPOST(
"search_firstname",
'alpha');
57 $search_gender =
GETPOST(
"search_gender",
'alpha');
58 $search_civility =
GETPOST(
"search_civility",
'alpha');
59 $search_company =
GETPOST(
'search_company',
'alphanohtml');
60 $search_login =
GETPOST(
"search_login",
'alpha');
61 $search_address =
GETPOST(
"search_address",
'alpha');
62 $search_zip =
GETPOST(
"search_zip",
'alpha');
63 $search_town =
GETPOST(
"search_town",
'alpha');
64 $search_state =
GETPOST(
"search_state",
'alpha');
65 $search_country =
GETPOST(
"search_country",
'alpha');
66 $search_phone =
GETPOST(
"search_phone",
'alpha');
67 $search_phone_perso =
GETPOST(
"search_phone_perso",
'alpha');
68 $search_phone_mobile =
GETPOST(
"search_phone_mobile",
'alpha');
69 $search_type =
GETPOST(
"search_type",
'alpha');
70 $search_email =
GETPOST(
"search_email",
'alpha');
71 $search_categ =
GETPOST(
"search_categ",
'int');
72 $search_filter =
GETPOST(
"search_filter",
'alpha');
73 $search_status =
GETPOST(
"search_status",
'intcomma');
74 $search_morphy =
GETPOST(
"search_morphy",
'alpha');
75 $search_import_key = trim(
GETPOST(
"search_import_key",
"alpha"));
76 $catid =
GETPOST(
"catid",
'int');
77 $optioncss =
GETPOST(
'optioncss',
'alpha');
78 $socid =
GETPOST(
'socid',
'int');
80 $filter =
GETPOST(
"filter",
'alpha');
82 $search_filter = $filter;
84 $statut =
GETPOST(
"statut",
'alpha');
86 $search_status = $statut;
89 $sall = trim((
GETPOST(
'search_all',
'alphanohtml') !=
'') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml'));
91 if ($search_status < -2) {
95 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
96 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
97 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
99 if (empty($page) || $page == -1) {
102 $offset = $limit * $page;
103 $pageprev = $page - 1;
104 $pagenext = $page + 1;
106 $sortorder = ($filter ==
'outofdate' ?
"DESC" :
"ASC");
109 $sortfield = ($filter ==
'outofdate' ?
"d.datefin" :
"d.lastname");
115 $hookmanager->initHooks(array(
'memberlist'));
119 $extrafields->fetch_name_optionals_label($object->table_element);
121 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
124 $fieldstosearchall = array(
127 'd.lastname'=>
'Lastname',
128 'd.firstname'=>
'Firstname',
130 'd.societe'=>
"Company",
132 'd.address'=>
'Address',
136 'd.phone_perso'=>
"PhonePerso",
137 'd.phone_mobile'=>
"PhoneMobile",
138 'd.note_public'=>
'NotePublic',
139 'd.note_private'=>
'NotePrivate',
141 if ($db->type ==
'pgsql') {
142 unset($fieldstosearchall[
'd.rowid']);
144 $arrayfields = array(
145 'd.ref'=>array(
'label'=>
"Ref",
'checked'=>1),
146 'd.civility'=>array(
'label'=>
"Civility",
'checked'=>0),
147 'd.lastname'=>array(
'label'=>
"Lastname",
'checked'=>1),
148 'd.firstname'=>array(
'label'=>
"Firstname",
'checked'=>1),
149 'd.gender'=>array(
'label'=>
"Gender",
'checked'=>0),
150 'd.company'=>array(
'label'=>
"Company",
'checked'=>1),
151 'd.login'=>array(
'label'=>
"Login",
'checked'=>1),
152 'd.morphy'=>array(
'label'=>
"MemberNature",
'checked'=>1),
153 't.libelle'=>array(
'label'=>
"Type",
'checked'=>1),
154 'd.email'=>array(
'label'=>
"Email",
'checked'=>1),
155 'd.address'=>array(
'label'=>
"Address",
'checked'=>0),
156 'd.zip'=>array(
'label'=>
"Zip",
'checked'=>0),
157 'd.town'=>array(
'label'=>
"Town",
'checked'=>0),
158 'd.phone'=>array(
'label'=>
"Phone",
'checked'=>0),
159 'd.phone_perso'=>array(
'label'=>
"PhonePerso",
'checked'=>0),
160 'd.phone_mobile'=>array(
'label'=>
"PhoneMobile",
'checked'=>0),
161 'state.nom'=>array(
'label'=>
"State",
'checked'=>0),
162 'country.code_iso'=>array(
'label'=>
"Country",
'checked'=>0),
165 'd.datefin'=>array(
'label'=>
"EndSubscription",
'checked'=>1,
'position'=>500),
166 'd.datec'=>array(
'label'=>
"DateCreation",
'checked'=>0,
'position'=>500),
167 'd.birth'=>array(
'label'=>
"Birthday",
'checked'=>0,
'position'=>500),
168 'd.tms'=>array(
'label'=>
"DateModificationShort",
'checked'=>0,
'position'=>500),
169 'd.statut'=>array(
'label'=>
"Status",
'checked'=>1,
'position'=>1000),
170 'd.import_key'=>array(
'label'=>
"ImportId",
'checked'=>0,
'position'=>1100),
173 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
183 if (
GETPOST(
'cancel',
'alpha')) {
187 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
191 $parameters = array(
'socid'=>isset($socid) ? $socid :
null);
192 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
197 if (empty($reshook)) {
199 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
202 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
208 $search_lastname =
"";
209 $search_firstname =
"";
211 $search_civility =
"";
213 $search_company =
"";
216 $search_address =
"";
220 $search_country =
'';
222 $search_phone_perso =
'';
223 $search_phone_mobile =
'';
228 $search_import_key =
'';
232 $search_array_options = array();
236 if ($massaction ==
'close' && $user->hasRight(
'adherent',
'creer')) {
243 foreach ($toselect as $idtoclose) {
244 $tmpmember->fetch($idtoclose);
245 $result = $tmpmember->resiliate($user);
247 if ($result < 0 && !count($tmpmember->errors)) {
266 if ($massaction ==
'createexternaluser' && $user->hasRight(
'adherent',
'creer') && $user->rights->user->user->creer) {
273 foreach ($toselect as $idtoclose) {
274 $tmpmember->fetch($idtoclose);
276 if (!empty($tmpmember->fk_soc)) {
277 $nuser =
new User($db);
280 $result = $nuser->create_from_member($tmpuser, $tmpmember->login);
282 if ($result < 0 && !count($tmpmember->errors)) {
293 setEventMessages($langs->trans(
"XExternalUserCreated", $nbcreated),
null,
'mesgs');
302 $objectclass =
'Adherent';
303 $objectlabel =
'Members';
304 $permissiontoread = $user->hasRight(
'adherent',
'lire');
305 $permissiontodelete = $user->hasRight(
'adherent',
'supprimer');
306 $permissiontoadd = $user->hasRight(
'adherent',
'creer');
307 $uploaddir = $conf->adherent->dir_output;
308 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
324 $title = $langs->trans(
"Members").
" - ".$langs->trans(
"List");
325 $help_url =
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
332 if ((!empty($search_categ) && $search_categ > 0) || !empty($catid)) {
333 $sql =
"SELECT DISTINCT";
337 $sql .=
" d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,";
338 $sql .=
" d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
339 $sql .=
" d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,";
340 $sql .=
" d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
341 $sql .=
" d.note_private, d.note_public, d.import_key,";
343 $sql .=
" ".$db->ifsql(
"d.societe IS NULL",
"s.nom",
"d.societe").
" as companyname,";
344 $sql .=
" t.libelle as type, t.subscription,";
345 $sql .=
" state.code_departement as state_code, state.nom as state_name,";
347 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
348 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
349 $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
"ef.".$key.
" as options_".$key.
', ' :
'');
353 $parameters = array();
354 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
355 $sql .= $hookmanager->resPrint;
356 $sql = preg_replace(
'/,\s*$/',
'', $sql);
360 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent as d";
361 if (!empty($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) {
362 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (d.rowid = ef.fk_object)";
364 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as country on (country.rowid = d.country)";
365 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_departements as state on (state.rowid = d.state_id)";
366 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe as s on (s.rowid = d.fk_soc)";
367 $sql .=
", ".MAIN_DB_PREFIX.
"adherent_type as t";
368 $sql .=
" WHERE d.fk_adherent_type = t.rowid";
370 if ($catid && empty($search_categ)) {
371 $search_categ = $catid;
374 $searchCategoryContactList = $search_categ ? array($search_categ) : array();
375 $searchCategoryContactOperator = 0;
377 if (!empty($searchCategoryContactList)) {
378 $searchCategoryContactSqlList = array();
379 $listofcategoryid =
'';
380 foreach ($searchCategoryContactList as $searchCategoryContact) {
381 if (intval($searchCategoryContact) == -2) {
382 $searchCategoryContactSqlList[] =
"NOT EXISTS (SELECT ck.fk_categorie FROM ".MAIN_DB_PREFIX.
"categorie_member as ck WHERE d.rowid = ck.fk_member)";
383 } elseif (intval($searchCategoryContact) > 0) {
384 if ($searchCategoryContactOperator == 0) {
385 $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).
")";
387 $listofcategoryid .= ($listofcategoryid ?
', ' :
'') .((
int) $searchCategoryContact);
391 if ($listofcategoryid) {
392 $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).
"))";
394 if ($searchCategoryContactOperator == 1) {
395 if (!empty($searchCategoryContactSqlList)) {
396 $sql .=
" AND (".implode(
' OR ', $searchCategoryContactSqlList).
")";
399 if (!empty($searchCategoryContactSqlList)) {
400 $sql .=
" AND (".implode(
' AND ', $searchCategoryContactSqlList).
")";
405 $sql .=
" AND d.entity IN (".getEntity(
'adherent').
")";
409 if ($search_type > 0) {
410 $sql .=
" AND t.rowid=".((int) $search_type);
412 if ($search_filter ==
'withoutsubscription') {
413 $sql .=
" AND (datefin IS NULL)";
415 if ($search_filter ==
'waitingsubscription') {
416 $sql .=
" AND (datefin IS NULL AND t.subscription = '1')";
418 if ($search_filter ==
'uptodate') {
419 $sql .=
" AND (datefin >= '".$db->idate($now).
"' OR (datefin IS NULL AND t.subscription = '0'))";
421 if ($search_filter ==
'outofdate') {
422 $sql .=
" AND (datefin < '".$db->idate($now).
"')";
424 if ($search_status !=
'') {
426 $sql .=
" AND d.statut in (".$db->sanitize($db->escape($search_status)).
")";
428 if ($search_morphy !=
'' && $search_morphy !=
'-1') {
434 if ($search_civility) {
437 if ($search_firstname) {
440 if ($search_lastname) {
441 $sql .=
natural_search(array(
"d.firstname",
"d.lastname",
"d.societe"), $search_lastname);
443 if ($search_gender !=
'' && $search_gender !=
'-1') {
449 if ($search_company) {
455 if ($search_address) {
470 if ($search_phone_perso) {
473 if ($search_phone_mobile) {
476 if ($search_country) {
477 $sql .=
" AND d.country IN (".$db->sanitize($search_country).
')';
479 if ($search_import_key) {
483 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
485 $parameters = array();
486 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
487 $sql .= $hookmanager->resPrint;
491 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
493 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
494 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
495 $resql = $db->query($sqlforcount);
497 $objforcount = $db->fetch_object(
$resql);
512 $sql .= $db->order($sortfield, $sortorder);
514 $sql .= $db->plimit($limit + 1, $offset);
517 $resql = $db->query($sql);
523 $num = $db->num_rows(
$resql);
527 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) {
528 $obj = $db->fetch_object(
$resql);
530 header(
"Location: ".DOL_URL_ROOT.
'/adherents/card.php?id='.$id);
539 $arrayofselected = is_array($toselect) ? $toselect : array();
541 if ($search_type > 0) {
543 $result = $membertype->fetch($search_type);
544 $title .=
" (".$membertype->label.
")";
548 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
549 $param .=
'&contextpage='.urlencode($contextpage);
551 if ($limit > 0 && $limit != $conf->liste_limit) {
552 $param .=
'&limit='.urlencode($limit);
555 $param .=
"&sall=".urlencode($sall);
558 $param .=
"&search_ref=".urlencode($search_ref);
560 if ($search_civility) {
561 $param .=
"&search_civility=".urlencode($search_civility);
563 if ($search_firstname) {
564 $param .=
"&search_firstname=".urlencode($search_firstname);
566 if ($search_lastname) {
567 $param .=
"&search_lastname=".urlencode($search_lastname);
569 if ($search_gender) {
570 $param .=
"&search_gender=".urlencode($search_gender);
573 $param .=
"&search_login=".urlencode($search_login);
576 $param .=
"&search_email=".urlencode($search_email);
578 if ($search_categ > 0 || $search_categ == -2) {
579 $param .=
"&search_categ=".urlencode($search_categ);
581 if ($search_company) {
582 $param .=
"&search_company=".urlencode($search_company);
584 if ($search_address !=
'') {
585 $param .=
"&search_address=".urlencode($search_address);
587 if ($search_town !=
'') {
588 $param .=
"&search_town=".urlencode($search_town);
590 if ($search_zip !=
'') {
591 $param .=
"&search_zip=".urlencode($search_zip);
593 if ($search_state !=
'') {
594 $param .=
"&search_state=".urlencode($search_state);
596 if ($search_country !=
'') {
597 $param .=
"&search_country=".urlencode($search_country);
599 if ($search_phone !=
'') {
600 $param .=
"&search_phone=".urlencode($search_phone);
602 if ($search_phone_perso !=
'') {
603 $param .=
"&search_phone_perso=".urlencode($search_phone_perso);
605 if ($search_phone_mobile !=
'') {
606 $param .=
"&search_phone_mobile=".urlencode($search_phone_mobile);
608 if ($search_filter && $search_filter !=
'-1') {
609 $param .=
"&search_filter=".urlencode($search_filter);
611 if ($search_status !=
"" && $search_status != -3) {
612 $param .=
"&search_status=".urlencode($search_status);
614 if ($search_import_key !=
'') {
615 $param .=
'&search_import_key='.urlencode($search_import_key);
617 if ($search_type > 0) {
618 $param .=
"&search_type=".urlencode($search_type);
620 if ($optioncss !=
'') {
621 $param .=
'&optioncss='.urlencode($optioncss);
624 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
627 $arrayofmassactions = array(
631 if ($user->hasRight(
'adherent',
'creer')) {
632 $arrayofmassactions[
'close'] =
img_picto(
'',
'close_title',
'class="pictofixedwidth"').$langs->trans(
"Resiliate");
634 if ($user->hasRight(
'adherent',
'supprimer')) {
635 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
637 if (
isModEnabled(
'category') && $user->hasRight(
'adherent',
'creer')) {
638 $arrayofmassactions[
'preaffecttag'] =
img_picto(
'',
'category',
'class="pictofixedwidth"').$langs->trans(
"AffectTag");
640 if ($user->hasRight(
'adherent',
'creer') && $user->hasRight(
'user',
'user',
'creer')) {
641 $arrayofmassactions[
'createexternaluser'] =
img_picto(
'',
'user',
'class="pictofixedwidth"').$langs->trans(
"CreateExternalUser");
643 if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete',
'preaffecttag'))) {
644 $arrayofmassactions = array();
646 $massactionbutton =
$form->selectMassAction(
'', $arrayofmassactions);
649 if ($user->hasRight(
'adherent',
'creer')) {
650 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewMember'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/adherents/card.php?action=create');
653 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
654 if ($optioncss !=
'') {
655 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
657 print
'<input type="hidden" name="token" value="'.newToken().
'">';
658 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
659 print
'<input type="hidden" name="action" value="list">';
660 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
661 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
662 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
664 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num,
$nbtotalofrecords, $object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
666 $topicmail =
"Information";
667 $modelmail =
"member";
669 $trackid =
'mem'.$object->id;
670 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
673 foreach ($fieldstosearchall as $key => $val) {
674 $fieldstosearchall[$key] = $langs->trans($val);
676 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $sall).join(
', ', $fieldstosearchall).
'</div>';
681 if (
isModEnabled(
'categorie') && $user->hasRight(
'categorie',
'lire')) {
682 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
683 $moreforfilter .=
'<div class="divsearchfield">';
684 $moreforfilter .=
img_picto($langs->trans(
'Categories'),
'category',
'class="pictofixedlength"').$formother->select_categories(Categorie::TYPE_MEMBER, $search_categ,
'search_categ', 1, $langs->trans(
"MembersCategoriesShort"));
685 $moreforfilter .=
'</div>';
687 $parameters = array();
688 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters);
689 if (empty($reshook)) {
690 $moreforfilter .= $hookmanager->resPrint;
692 $moreforfilter = $hookmanager->resPrint;
694 if (!empty($moreforfilter)) {
695 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
696 print $moreforfilter;
700 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
701 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN',
''));
702 if ($massactionbutton) {
703 $selectedfields .=
$form->showCheckAddButtons(
'checkforselect', 1);
706 print
'<div class="div-table-responsive">';
707 print
'<table class="tagtable liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
710 print
'<tr class="liste_titre_filter">';
712 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
713 print
'<td class="liste_titre middle">';
714 $searchpicto =
$form->showFilterButtons(
'left');
719 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
720 print
'<td class="liste_titre"> </td>';
724 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
725 print
'<td class="liste_titre">';
726 print
'<input class="flat maxwidth75imp" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
729 if (!empty($arrayfields[
'd.civility'][
'checked'])) {
730 print
'<td class="liste_titre left">';
731 print
'<input class="flat maxwidth50imp" type="text" name="search_civility" value="'.dol_escape_htmltag($search_civility).
'"></td>';
733 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
734 print
'<td class="liste_titre left">';
735 print
'<input class="flat maxwidth75imp" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).
'"></td>';
737 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
738 print
'<td class="liste_titre left">';
739 print
'<input class="flat maxwidth75imp" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).
'"></td>';
741 if (!empty($arrayfields[
'd.gender'][
'checked'])) {
742 print
'<td class="liste_titre">';
743 $arraygender = array(
'man'=>$langs->trans(
"Genderman"),
'woman'=>$langs->trans(
"Genderwoman"),
'other'=>$langs->trans(
"Genderother"));
744 print
$form->selectarray(
'search_gender', $arraygender, $search_gender, 1);
747 if (!empty($arrayfields[
'd.company'][
'checked'])) {
748 print
'<td class="liste_titre left">';
749 print
'<input class="flat maxwidth75imp" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).
'"></td>';
751 if (!empty($arrayfields[
'd.login'][
'checked'])) {
752 print
'<td class="liste_titre left">';
753 print
'<input class="flat maxwidth75imp" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).
'"></td>';
756 if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
757 print
'<td class="liste_titre center">';
758 $arraymorphy = array(
'mor'=>$langs->trans(
"Moral"),
'phy'=>$langs->trans(
"Physical"));
759 print
$form->selectarray(
'search_morphy', $arraymorphy, $search_morphy, 1, 0, 0,
'', 0, 0, 0,
'',
'maxwidth100');
762 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
765 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
766 print
'<td class="liste_titre">';
767 $listetype = $membertypestatic->liste_array();
768 print
$form->selectarray(
"search_type", $listetype, $search_type, 1, 0, 0,
'', 0, 32);
772 if (!empty($arrayfields[
'd.address'][
'checked'])) {
773 print
'<td class="liste_titre left">';
774 print
'<input class="flat maxwidth75imp" type="text" name="search_address" value="'.dol_escape_htmltag($search_address).
'"></td>';
777 if (!empty($arrayfields[
'd.zip'][
'checked'])) {
778 print
'<td class="liste_titre left">';
779 print
'<input class="flat maxwidth50imp" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).
'"></td>';
781 if (!empty($arrayfields[
'd.town'][
'checked'])) {
782 print
'<td class="liste_titre left">';
783 print
'<input class="flat maxwidth75imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).
'"></td>';
786 if (!empty($arrayfields[
'state.nom'][
'checked'])) {
787 print
'<td class="liste_titre">';
788 print
'<input class="flat searchstring maxwidth75imp" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).
'">';
792 if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
793 print
'<td class="liste_titre center">';
794 print
$form->select_country($search_country,
'search_country',
'', 0,
'minwidth100imp maxwidth100');
798 if (!empty($arrayfields[
'd.phone'][
'checked'])) {
799 print
'<td class="liste_titre left">';
800 print
'<input class="flat maxwidth75imp" type="text" name="search_phone" value="'.dol_escape_htmltag($search_phone).
'"></td>';
803 if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
804 print
'<td class="liste_titre left">';
805 print
'<input class="flat maxwidth50" type="text" name="search_phone_perso" value="'.dol_escape_htmltag($search_phone_perso).
'"></td>';
808 if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
809 print
'<td class="liste_titre left">';
810 print
'<input class="flat maxwidth75imp" type="text" name="search_phone_mobile" value="'.dol_escape_htmltag($search_phone_mobile).
'"></td>';
813 if (!empty($arrayfields[
'd.email'][
'checked'])) {
814 print
'<td class="liste_titre left">';
815 print
'<input class="flat maxwidth75imp" type="text" name="search_email" value="'.dol_escape_htmltag($search_email).
'"></td>';
818 if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
819 print
'<td class="liste_titre center">';
821 $selectarray = array(
'-1'=>
'',
'waitingsubscription'=>$langs->trans(
"WaitingSubscription"),
'uptodate'=>$langs->trans(
"UpToDate"),
'outofdate'=>$langs->trans(
"OutOfDate"));
822 print
$form->selectarray(
'search_filter', $selectarray, $search_filter);
826 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
829 $parameters = array(
'arrayfields'=>$arrayfields);
830 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
831 print $hookmanager->resPrint;
833 if (!empty($arrayfields[
'd.datec'][
'checked'])) {
834 print
'<td class="liste_titre">';
838 if (!empty($arrayfields[
'd.birth'][
'checked'])) {
839 print
'<td class="liste_titre">';
843 if (!empty($arrayfields[
'd.tms'][
'checked'])) {
844 print
'<td class="liste_titre">';
848 if (!empty($arrayfields[
'd.statut'][
'checked'])) {
849 print
'<td class="liste_titre right maxwidthonsmartphone">';
856 print
$form->selectarray(
'search_status', $liststatus, $search_status, -3, 0, 0,
'', 0, 0, 0,
'',
'onrightofpage');
859 if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
860 print
'<td class="liste_titre center">';
861 print
'<input class="flat searchstring maxwidth50" type="text" name="search_import_key" value="'.dol_escape_htmltag($search_import_key).
'">';
864 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
866 print
'<td class="liste_titre middle">';
867 $searchpicto =
$form->showFilterButtons();
873 print
'<tr class="liste_titre">';
874 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
875 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch actioncolumn ');
877 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
880 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
881 print_liste_field_titre($arrayfields[
'd.ref'][
'label'], $_SERVER[
"PHP_SELF"],
'd.ref',
'', $param,
'', $sortfield, $sortorder);
883 if (!empty($arrayfields[
'd.civility'][
'checked'])) {
884 print_liste_field_titre($arrayfields[
'd.civility'][
'label'], $_SERVER[
"PHP_SELF"],
'd.civility',
'', $param,
'', $sortfield, $sortorder);
886 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
887 print_liste_field_titre($arrayfields[
'd.firstname'][
'label'], $_SERVER[
"PHP_SELF"],
'd.firstname',
'', $param,
'', $sortfield, $sortorder);
889 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
890 print_liste_field_titre($arrayfields[
'd.lastname'][
'label'], $_SERVER[
"PHP_SELF"],
'd.lastname',
'', $param,
'', $sortfield, $sortorder);
892 if (!empty($arrayfields[
'd.gender'][
'checked'])) {
893 print_liste_field_titre($arrayfields[
'd.gender'][
'label'], $_SERVER[
'PHP_SELF'],
'd.gender', $param,
"",
"", $sortfield, $sortorder);
895 if (!empty($arrayfields[
'd.company'][
'checked'])) {
896 print_liste_field_titre($arrayfields[
'd.company'][
'label'], $_SERVER[
"PHP_SELF"],
'companyname',
'', $param,
'', $sortfield, $sortorder);
898 if (!empty($arrayfields[
'd.login'][
'checked'])) {
899 print_liste_field_titre($arrayfields[
'd.login'][
'label'], $_SERVER[
"PHP_SELF"],
'd.login',
'', $param,
'', $sortfield, $sortorder);
901 if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
902 print_liste_field_titre($arrayfields[
'd.morphy'][
'label'], $_SERVER[
"PHP_SELF"],
'd.morphy',
'', $param,
'', $sortfield, $sortorder);
904 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
905 print_liste_field_titre($arrayfields[
't.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
't.libelle',
'', $param,
'', $sortfield, $sortorder);
907 if (!empty($arrayfields[
'd.address'][
'checked'])) {
908 print_liste_field_titre($arrayfields[
'd.address'][
'label'], $_SERVER[
"PHP_SELF"],
'd.address',
'', $param,
'', $sortfield, $sortorder);
910 if (!empty($arrayfields[
'd.zip'][
'checked'])) {
911 print_liste_field_titre($arrayfields[
'd.zip'][
'label'], $_SERVER[
"PHP_SELF"],
'd.zip',
'', $param,
'', $sortfield, $sortorder);
913 if (!empty($arrayfields[
'd.town'][
'checked'])) {
914 print_liste_field_titre($arrayfields[
'd.town'][
'label'], $_SERVER[
"PHP_SELF"],
'd.town',
'', $param,
'', $sortfield, $sortorder);
916 if (!empty($arrayfields[
'state.nom'][
'checked'])) {
917 print_liste_field_titre($arrayfields[
'state.nom'][
'label'], $_SERVER[
"PHP_SELF"],
"state.nom",
"", $param,
'', $sortfield, $sortorder);
919 if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
920 print_liste_field_titre($arrayfields[
'country.code_iso'][
'label'], $_SERVER[
"PHP_SELF"],
"country.code_iso",
"", $param,
'', $sortfield, $sortorder,
'center ');
922 if (!empty($arrayfields[
'd.phone'][
'checked'])) {
923 print_liste_field_titre($arrayfields[
'd.phone'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone',
'', $param,
'', $sortfield, $sortorder);
925 if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
926 print_liste_field_titre($arrayfields[
'd.phone_perso'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone_perso',
'', $param,
'', $sortfield, $sortorder);
928 if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
929 print_liste_field_titre($arrayfields[
'd.phone_mobile'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone_mobile',
'', $param,
'', $sortfield, $sortorder);
931 if (!empty($arrayfields[
'd.email'][
'checked'])) {
932 print_liste_field_titre($arrayfields[
'd.email'][
'label'], $_SERVER[
"PHP_SELF"],
'd.email',
'', $param,
'', $sortfield, $sortorder);
934 if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
935 print_liste_field_titre($arrayfields[
'd.datefin'][
'label'], $_SERVER[
"PHP_SELF"],
'd.datefin,t.subscription',
'', $param,
'', $sortfield, $sortorder,
'center ');
938 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
941 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
942 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
943 print $hookmanager->resPrint;
944 if (!empty($arrayfields[
'd.datec'][
'checked'])) {
945 print_liste_field_titre($arrayfields[
'd.datec'][
'label'], $_SERVER[
"PHP_SELF"],
"d.datec",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
947 if (!empty($arrayfields[
'd.birth'][
'checked'])) {
948 print_liste_field_titre($arrayfields[
'd.birth'][
'label'], $_SERVER[
"PHP_SELF"],
"d.birth",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
950 if (!empty($arrayfields[
'd.tms'][
'checked'])) {
951 print_liste_field_titre($arrayfields[
'd.tms'][
'label'], $_SERVER[
"PHP_SELF"],
"d.tms",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
953 if (!empty($arrayfields[
'd.statut'][
'checked'])) {
954 print_liste_field_titre($arrayfields[
'd.statut'][
'label'], $_SERVER[
"PHP_SELF"],
"d.statut,t.subscription,d.datefin",
"", $param,
'class="right"', $sortfield, $sortorder);
956 if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
957 print_liste_field_titre($arrayfields[
'd.import_key'][
'label'], $_SERVER[
"PHP_SELF"],
"d.import_key",
"", $param,
'', $sortfield, $sortorder,
'center ');
959 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
960 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
965 $totalarray = array();
966 $totalarray[
'nbfield'] = 0;
967 while ($i < min($num, $limit)) {
968 $obj = $db->fetch_object(
$resql);
970 $datefin = $db->jdate($obj->datefin);
972 $memberstatic->id = $obj->rowid;
973 $memberstatic->ref = $obj->ref;
974 $memberstatic->civility_id = $obj->civility;
975 $memberstatic->login = $obj->login;
976 $memberstatic->lastname = $obj->lastname;
977 $memberstatic->firstname = $obj->firstname;
978 $memberstatic->gender = $obj->gender;
979 $memberstatic->statut = $obj->statut;
980 $memberstatic->datefin = $datefin;
981 $memberstatic->socid = $obj->fk_soc;
982 $memberstatic->photo = $obj->photo;
983 $memberstatic->email = $obj->email;
984 $memberstatic->morphy = $obj->morphy;
985 $memberstatic->note_public = $obj->note_public;
986 $memberstatic->note_private = $obj->note_private;
987 $memberstatic->need_subscription = $obj->subscription;
989 if (!empty($obj->fk_soc)) {
990 $memberstatic->fetch_thirdparty();
991 if ($memberstatic->thirdparty->id > 0) {
992 $companyname = $memberstatic->thirdparty->name;
993 $companynametoshow = $memberstatic->thirdparty->getNomUrl(1);
996 $companyname = $obj->company;
997 $companynametoshow = $obj->company;
999 $memberstatic->company = $companyname;
1001 print
'<tr class="oddeven">';
1004 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
1005 print
'<td class="center">';
1006 if ($massactionbutton || $massaction) {
1008 if (in_array($obj->rowid, $arrayofselected)) {
1011 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1016 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
1017 print
'<td class="center" data-key="id">'.$obj->rowid.
'</td>';
1019 $totalarray[
'nbfield']++;
1024 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
1026 print $memberstatic->getNomUrl(-1, 0,
'card',
'ref',
'', -1, 0, 1);
1029 $totalarray[
'nbfield']++;
1033 if (!empty($arrayfields[
'd.civility'][
'checked'])) {
1035 print $obj->civility;
1038 $totalarray[
'nbfield']++;
1042 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
1043 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).
'">';
1044 print $memberstatic->getNomUrl(0, 0,
'card',
'firstname');
1048 $totalarray[
'nbfield']++;
1052 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
1053 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->lastname).
'">';
1054 print $memberstatic->getNomUrl(0, 0,
'card',
'lastname');
1058 $totalarray[
'nbfield']++;
1062 if (!empty($arrayfields[
'd.gender'][
'checked'])) {
1065 print $langs->trans(
"Gender".$obj->gender);
1069 $totalarray[
'nbfield']++;
1073 if (!empty($arrayfields[
'd.company'][
'checked'])) {
1074 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($companyname).
'">';
1075 print $companynametoshow;
1079 if (!empty($arrayfields[
'd.login'][
'checked'])) {
1080 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->login).
'">'.$obj->login.
"</td>\n";
1082 $totalarray[
'nbfield']++;
1086 if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
1087 print
'<td class="center">';
1088 print $memberstatic->getmorphylib(
'', 2);
1091 $totalarray[
'nbfield']++;
1095 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
1096 $membertypestatic->id = $obj->type_id;
1097 $membertypestatic->label = $obj->type;
1098 print
'<td class="nowraponall">';
1099 print $membertypestatic->getNomUrl(1, 32);
1102 $totalarray[
'nbfield']++;
1106 if (!empty($arrayfields[
'd.address'][
'checked'])) {
1107 print
'<td class="nocellnopadd tdoverflowmax200" title="'.dol_escape_htmltag($obj->address).
'">';
1108 print $obj->address;
1111 $totalarray[
'nbfield']++;
1115 if (!empty($arrayfields[
'd.zip'][
'checked'])) {
1116 print
'<td class="nocellnopadd">';
1120 $totalarray[
'nbfield']++;
1124 if (!empty($arrayfields[
'd.town'][
'checked'])) {
1125 print
'<td class="nocellnopadd">';
1129 $totalarray[
'nbfield']++;
1133 if (!empty($arrayfields[
'state.nom'][
'checked'])) {
1134 print
"<td>".$obj->state_name.
"</td>\n";
1136 $totalarray[
'nbfield']++;
1140 if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
1141 $tmparray =
getCountry($obj->country,
'all');
1142 print
'<td class="center tdoverflowmax100" title="'.dol_escape_htmltag($tmparray[
'label']).
'">';
1146 $totalarray[
'nbfield']++;
1150 if (!empty($arrayfields[
'd.phone'][
'checked'])) {
1151 print
'<td class="nocellnopadd">';
1155 $totalarray[
'nbfield']++;
1159 if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
1160 print
'<td class="nocellnopadd">';
1161 print $obj->phone_perso;
1164 $totalarray[
'nbfield']++;
1168 if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
1169 print
'<td class="nocellnopadd">';
1170 print $obj->phone_mobile;
1173 $totalarray[
'nbfield']++;
1177 if (!empty($arrayfields[
'd.email'][
'checked'])) {
1178 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->email).
'">';
1183 $datefin = $db->jdate($obj->datefin);
1184 if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
1185 print
'<td class="nowrap center">';
1188 if ($memberstatic->hasDelay()) {
1189 $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").
')';
1190 print
" ".img_warning($langs->trans(
"SubscriptionLate").$textlate);
1193 if (!empty($obj->subscription)) {
1194 print
'<span class="opacitymedium">'.$langs->trans(
"SubscriptionNotReceived").
'</span>';
1195 if ($obj->statut > 0) {
1196 print
" ".img_warning();
1205 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1207 $parameters = array(
'arrayfields'=>$arrayfields,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
1208 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
1209 print $hookmanager->resPrint;
1211 if (!empty($arrayfields[
'd.datec'][
'checked'])) {
1212 print
'<td class="nowrap center">';
1213 print
dol_print_date($db->jdate($obj->date_creation),
'dayhour',
'tzuser');
1216 $totalarray[
'nbfield']++;
1220 if (!empty($arrayfields[
'd.birth'][
'checked'])) {
1221 print
'<td class="nowrap center">';
1225 $totalarray[
'nbfield']++;
1229 if (!empty($arrayfields[
'd.tms'][
'checked'])) {
1230 print
'<td class="nowrap center">';
1231 print
dol_print_date($db->jdate($obj->date_update),
'dayhour',
'tzuser');
1234 $totalarray[
'nbfield']++;
1238 if (!empty($arrayfields[
'd.statut'][
'checked'])) {
1239 print
'<td class="nowrap right">';
1240 print $memberstatic->LibStatut($obj->statut, $obj->subscription, $datefin, 5);
1243 $totalarray[
'nbfield']++;
1246 if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
1247 print
'<td class="tdoverflowmax100 center" title="'.dol_escape_htmltag($obj->import_key).
'">';
1251 $totalarray[
'nbfield']++;
1255 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
1256 print
'<td class="center">';
1257 if ($massactionbutton || $massaction) {
1259 if (in_array($obj->rowid, $arrayofselected)) {
1262 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1267 $totalarray[
'nbfield']++;
1275 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1281 foreach ($arrayfields as $key => $val) {
1282 if (!empty($val[
'checked'])) {
1286 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
1291 $parameters = array(
'sql' => $sql);
1292 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters);
1293 print $hookmanager->resPrint;
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
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.
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
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...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
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.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_clone($object, $native=0)
Create a clone of instance of object (new instance with same value for each properties) With native =...
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
isModEnabled($module)
Is Dolibarr module enabled.
$nbtotalofrecords
Count total nb of records.
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.