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"));
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',
129 'd.societe'=>
"Company",
131 'd.address'=>
'Address',
135 'd.phone_perso'=>
"PhonePerso",
136 'd.phone_mobile'=>
"PhoneMobile",
137 'd.note_public'=>
'NotePublic',
138 'd.note_private'=>
'NotePrivate',
140 if ($db->type ==
'pgsql') {
141 unset($fieldstosearchall[
'd.rowid']);
143 $arrayfields = array(
144 'd.ref'=>array(
'label'=>
"Ref",
'checked'=>1),
145 'd.civility'=>array(
'label'=>
"Civility",
'checked'=>0),
146 'd.lastname'=>array(
'label'=>
"Lastname",
'checked'=>1),
147 'd.firstname'=>array(
'label'=>
"Firstname",
'checked'=>1),
148 'd.gender'=>array(
'label'=>
"Gender",
'checked'=>0),
149 'd.company'=>array(
'label'=>
"Company",
'checked'=>1),
150 'd.login'=>array(
'label'=>
"Login",
'checked'=>1),
151 'd.morphy'=>array(
'label'=>
"MemberNature",
'checked'=>1),
152 't.libelle'=>array(
'label'=>
"Type",
'checked'=>1),
153 'd.email'=>array(
'label'=>
"Email",
'checked'=>1),
154 'd.address'=>array(
'label'=>
"Address",
'checked'=>0),
155 'd.zip'=>array(
'label'=>
"Zip",
'checked'=>0),
156 'd.town'=>array(
'label'=>
"Town",
'checked'=>0),
157 'd.phone'=>array(
'label'=>
"Phone",
'checked'=>0),
158 'd.phone_perso'=>array(
'label'=>
"PhonePerso",
'checked'=>0),
159 'd.phone_mobile'=>array(
'label'=>
"PhoneMobile",
'checked'=>0),
160 'state.nom'=>array(
'label'=>
"State",
'checked'=>0),
161 'country.code_iso'=>array(
'label'=>
"Country",
'checked'=>0),
164 'd.datefin'=>array(
'label'=>
"EndSubscription",
'checked'=>1,
'position'=>500),
165 'd.datec'=>array(
'label'=>
"DateCreation",
'checked'=>0,
'position'=>500),
166 'd.birth'=>array(
'label'=>
"Birthday",
'checked'=>0,
'position'=>500),
167 'd.tms'=>array(
'label'=>
"DateModificationShort",
'checked'=>0,
'position'=>500),
168 'd.statut'=>array(
'label'=>
"Status",
'checked'=>1,
'position'=>1000),
169 'd.import_key'=>array(
'label'=>
"ImportId",
'checked'=>0,
'position'=>1100),
172 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
182 if (
GETPOST(
'cancel',
'alpha')) {
183 $action =
'list'; $massaction =
'';
185 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
189 $parameters = array(
'socid'=>isset($socid) ? $socid :
null);
190 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
195 if (empty($reshook)) {
197 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
200 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
206 $search_lastname =
"";
207 $search_firstname =
"";
209 $search_civility =
"";
211 $search_company =
"";
214 $search_address =
"";
218 $search_country =
'';
220 $search_phone_perso =
'';
221 $search_phone_mobile =
'';
226 $search_import_key =
'';
230 $search_array_options = array();
234 if ($massaction ==
'close' && $user->hasRight(
'adherent',
'creer')) {
241 foreach ($toselect as $idtoclose) {
242 $tmpmember->fetch($idtoclose);
243 $result = $tmpmember->resiliate($user);
245 if ($result < 0 && !count($tmpmember->errors)) {
264 if ($massaction ==
'createexternaluser' && $user->hasRight(
'adherent',
'creer') && $user->hasRight(
'user',
'user',
'creer')) {
271 foreach ($toselect as $idtoclose) {
272 $tmpmember->fetch($idtoclose);
274 if (!empty($tmpmember->fk_soc)) {
275 $nuser =
new User($db);
278 $result = $nuser->create_from_member($tmpuser, $tmpmember->login);
280 if ($result < 0 && !count($tmpmember->errors)) {
291 setEventMessages($langs->trans(
"XExternalUserCreated", $nbcreated),
null,
'mesgs');
300 $objectclass =
'Adherent';
301 $objectlabel =
'Members';
302 $permissiontoread = $user->hasRight(
'adherent',
'lire');
303 $permissiontodelete = $user->hasRight(
'adherent',
'supprimer');
304 $permissiontoadd = $user->hasRight(
'adherent',
'creer');
305 $uploaddir = $conf->adherent->dir_output;
306 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
319 $title = $langs->trans(
"Members");
323 if ((!empty($search_categ) && $search_categ > 0) || !empty($catid)) {
324 $sql =
"SELECT DISTINCT";
328 $sql .=
" d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,";
329 $sql .=
" d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
330 $sql .=
" d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,";
331 $sql .=
" d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
332 $sql .=
" d.note_private, d.note_public, d.import_key,";
334 $sql .=
" ".$db->ifsql(
"d.societe IS NULL",
"s.nom",
"d.societe").
" as companyname,";
335 $sql .=
" t.libelle as type, t.subscription,";
336 $sql .=
" state.code_departement as state_code, state.nom as state_name,";
338 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
339 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
340 $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
"ef.".$key.
" as options_".$key.
', ' :
'');
344 $parameters = array();
345 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters);
346 $sql .= preg_replace(
'/^,/',
'', $hookmanager->resPrint);
347 $sql = preg_replace(
'/,\s*$/',
'', $sql);
351 $sql .=
" FROM ".MAIN_DB_PREFIX.
"adherent as d";
352 if (!empty($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) {
353 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (d.rowid = ef.fk_object)";
355 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as country on (country.rowid = d.country)";
356 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_departements as state on (state.rowid = d.state_id)";
357 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe as s on (s.rowid = d.fk_soc)";
358 $sql .=
", ".MAIN_DB_PREFIX.
"adherent_type as t";
359 $sql .=
" WHERE d.fk_adherent_type = t.rowid";
361 if ($catid && empty($search_categ)) {
362 $search_categ = $catid;
365 $searchCategoryContactList = $search_categ ? array($search_categ) : array();
366 $searchCategoryContactOperator = 0;
368 if (!empty($searchCategoryContactList)) {
369 $searchCategoryContactSqlList = array();
370 $listofcategoryid =
'';
371 foreach ($searchCategoryContactList as $searchCategoryContact) {
372 if (intval($searchCategoryContact) == -2) {
373 $searchCategoryContactSqlList[] =
"NOT EXISTS (SELECT ck.fk_categorie FROM ".MAIN_DB_PREFIX.
"categorie_member as ck WHERE d.rowid = ck.fk_member)";
374 } elseif (intval($searchCategoryContact) > 0) {
375 if ($searchCategoryContactOperator == 0) {
376 $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).
")";
378 $listofcategoryid .= ($listofcategoryid ?
', ' :
'') .((
int) $searchCategoryContact);
382 if ($listofcategoryid) {
383 $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).
"))";
385 if ($searchCategoryContactOperator == 1) {
386 if (!empty($searchCategoryContactSqlList)) {
387 $sql .=
" AND (".implode(
' OR ', $searchCategoryContactSqlList).
")";
390 if (!empty($searchCategoryContactSqlList)) {
391 $sql .=
" AND (".implode(
' AND ', $searchCategoryContactSqlList).
")";
396 $sql .=
" AND d.entity IN (".getEntity(
'adherent').
")";
400 if ($search_type > 0) {
401 $sql .=
" AND t.rowid=".((int) $search_type);
403 if ($search_filter ==
'withoutsubscription') {
404 $sql .=
" AND (datefin IS NULL)";
406 if ($search_filter ==
'waitingsubscription') {
407 $sql .=
" AND (datefin IS NULL AND t.subscription = '1')";
409 if ($search_filter ==
'uptodate') {
410 $sql .=
" AND (datefin >= '".$db->idate($now).
"' OR t.subscription = '0')";
412 if ($search_filter ==
'outofdate') {
413 $sql .=
" AND (datefin < '".$db->idate($now).
"' AND t.subscription = '1')";
415 if ($search_status !=
'') {
417 $sql .=
" AND d.statut in (".$db->sanitize($db->escape($search_status)).
")";
419 if ($search_morphy !=
'' && $search_morphy !=
'-1') {
425 if ($search_civility) {
428 if ($search_firstname) {
431 if ($search_lastname) {
432 $sql .=
natural_search(array(
"d.firstname",
"d.lastname",
"d.societe"), $search_lastname);
434 if ($search_gender !=
'' && $search_gender !=
'-1') {
440 if ($search_company) {
446 if ($search_address) {
461 if ($search_phone_perso) {
464 if ($search_phone_mobile) {
467 if ($search_country) {
468 $sql .=
" AND d.country IN (".$db->sanitize($search_country).
')';
470 if ($search_import_key) {
475 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
478 $parameters = array();
479 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
480 $sql .= $hookmanager->resPrint;
484 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
486 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
487 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
488 $resql = $db->query($sqlforcount);
490 $objforcount = $db->fetch_object(
$resql);
504 $sql .= $db->order($sortfield, $sortorder);
506 $sql .= $db->plimit($limit + 1, $offset);
509 $resql = $db->query($sql);
515 $num = $db->num_rows(
$resql);
518 $arrayofselected = is_array($toselect) ? $toselect : array();
520 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) {
521 $obj = $db->fetch_object(
$resql);
523 header(
"Location: ".DOL_URL_ROOT.
'/adherents/card.php?id='.$id);
527 $help_url =
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
530 if ($search_type > 0) {
532 $result = $membertype->fetch($search_type);
533 $title .=
" (".$membertype->label.
")";
537 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
538 $param .=
'&contextpage='.urlencode($contextpage);
540 if ($limit > 0 && $limit != $conf->liste_limit) {
541 $param .=
'&limit='.urlencode($limit);
544 $param .=
"&sall=".urlencode($sall);
547 $param .=
"&search_ref=".urlencode($search_ref);
549 if ($search_civility) {
550 $param .=
"&search_civility=".urlencode($search_civility);
552 if ($search_firstname) {
553 $param .=
"&search_firstname=".urlencode($search_firstname);
555 if ($search_lastname) {
556 $param .=
"&search_lastname=".urlencode($search_lastname);
558 if ($search_gender) {
559 $param .=
"&search_gender=".urlencode($search_gender);
562 $param .=
"&search_login=".urlencode($search_login);
565 $param .=
"&search_email=".urlencode($search_email);
567 if ($search_categ > 0 || $search_categ == -2) {
568 $param .=
"&search_categ=".urlencode($search_categ);
570 if ($search_company) {
571 $param .=
"&search_company=".urlencode($search_company);
573 if ($search_address !=
'') {
574 $param .=
"&search_address=".urlencode($search_address);
576 if ($search_town !=
'') {
577 $param .=
"&search_town=".urlencode($search_town);
579 if ($search_zip !=
'') {
580 $param .=
"&search_zip=".urlencode($search_zip);
582 if ($search_state !=
'') {
583 $param .=
"&search_state=".urlencode($search_state);
585 if ($search_country !=
'') {
586 $param .=
"&search_country=".urlencode($search_country);
588 if ($search_phone !=
'') {
589 $param .=
"&search_phone=".urlencode($search_phone);
591 if ($search_phone_perso !=
'') {
592 $param .=
"&search_phone_perso=".urlencode($search_phone_perso);
594 if ($search_phone_mobile !=
'') {
595 $param .=
"&search_phone_mobile=".urlencode($search_phone_mobile);
597 if ($search_filter && $search_filter !=
'-1') {
598 $param .=
"&search_filter=".urlencode($search_filter);
600 if ($search_status !=
"" && $search_status != -3) {
601 $param .=
"&search_status=".urlencode($search_status);
603 if ($search_import_key !=
'') {
604 $param .=
'&search_import_key='.urlencode($search_import_key);
606 if ($search_type > 0) {
607 $param .=
"&search_type=".urlencode($search_type);
609 if ($optioncss !=
'') {
610 $param .=
'&optioncss='.urlencode($optioncss);
613 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
616 $arrayofmassactions = array(
620 if ($user->hasRight(
'adherent',
'creer')) {
621 $arrayofmassactions[
'close'] =
img_picto(
'',
'close_title',
'class="pictofixedwidth"').$langs->trans(
"Resiliate");
623 if ($user->hasRight(
'adherent',
'supprimer')) {
624 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
626 if (
isModEnabled(
'category') && $user->hasRight(
'adherent',
'creer')) {
627 $arrayofmassactions[
'preaffecttag'] =
img_picto(
'',
'category',
'class="pictofixedwidth"').$langs->trans(
"AffectTag");
629 if ($user->hasRight(
'adherent',
'creer') && $user->hasRight(
'user',
'user',
'creer')) {
630 $arrayofmassactions[
'createexternaluser'] =
img_picto(
'',
'user',
'class="pictofixedwidth"').$langs->trans(
"CreateExternalUser");
632 if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete',
'preaffecttag'))) {
633 $arrayofmassactions = array();
635 $massactionbutton =
$form->selectMassAction(
'', $arrayofmassactions);
638 if ($user->hasRight(
'adherent',
'creer')) {
639 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewMember'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/adherents/card.php?action=create');
642 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
643 if ($optioncss !=
'') {
644 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
646 print
'<input type="hidden" name="token" value="'.newToken().
'">';
647 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
648 print
'<input type="hidden" name="action" value="list">';
649 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
650 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
651 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
653 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num,
$nbtotalofrecords, $object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
655 $topicmail =
"Information";
656 $modelmail =
"member";
658 $trackid =
'mem'.$object->id;
659 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
662 foreach ($fieldstosearchall as $key => $val) {
663 $fieldstosearchall[$key] = $langs->trans($val);
665 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $sall).join(
', ', $fieldstosearchall).
'</div>';
670 if (
isModEnabled(
'categorie') && $user->hasRight(
'categorie',
'lire')) {
671 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
672 $moreforfilter .=
'<div class="divsearchfield">';
673 $moreforfilter .=
img_picto($langs->trans(
'Categories'),
'category',
'class="pictofixedlength"').$formother->select_categories(Categorie::TYPE_MEMBER, $search_categ,
'search_categ', 1, $langs->trans(
"MembersCategoriesShort"));
674 $moreforfilter .=
'</div>';
676 $parameters = array();
677 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters);
678 if (empty($reshook)) {
679 $moreforfilter .= $hookmanager->resPrint;
681 $moreforfilter = $hookmanager->resPrint;
683 if (!empty($moreforfilter)) {
684 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
685 print $moreforfilter;
689 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
690 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN',
''));
691 if ($massactionbutton) {
692 $selectedfields .=
$form->showCheckAddButtons(
'checkforselect', 1);
695 print
'<div class="div-table-responsive">';
696 print
'<table class="tagtable liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
699 print
'<tr class="liste_titre_filter">';
701 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
702 print
'<td class="liste_titre middle">';
703 $searchpicto =
$form->showFilterButtons(
'left');
708 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
709 print
'<td class="liste_titre"> </td>';
713 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
714 print
'<td class="liste_titre">';
715 print
'<input class="flat maxwidth75imp" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
718 if (!empty($arrayfields[
'd.civility'][
'checked'])) {
719 print
'<td class="liste_titre left">';
720 print
'<input class="flat maxwidth50imp" type="text" name="search_civility" value="'.dol_escape_htmltag($search_civility).
'"></td>';
722 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
723 print
'<td class="liste_titre left">';
724 print
'<input class="flat maxwidth75imp" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).
'"></td>';
726 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
727 print
'<td class="liste_titre left">';
728 print
'<input class="flat maxwidth75imp" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).
'"></td>';
730 if (!empty($arrayfields[
'd.gender'][
'checked'])) {
731 print
'<td class="liste_titre">';
732 $arraygender = array(
'man'=>$langs->trans(
"Genderman"),
'woman'=>$langs->trans(
"Genderwoman"),
'other'=>$langs->trans(
"Genderother"));
733 print
$form->selectarray(
'search_gender', $arraygender, $search_gender, 1);
736 if (!empty($arrayfields[
'd.company'][
'checked'])) {
737 print
'<td class="liste_titre left">';
738 print
'<input class="flat maxwidth75imp" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).
'"></td>';
740 if (!empty($arrayfields[
'd.login'][
'checked'])) {
741 print
'<td class="liste_titre left">';
742 print
'<input class="flat maxwidth75imp" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).
'"></td>';
745 if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
746 print
'<td class="liste_titre center">';
747 $arraymorphy = array(
'mor'=>$langs->trans(
"Moral"),
'phy'=>$langs->trans(
"Physical"));
748 print
$form->selectarray(
'search_morphy', $arraymorphy, $search_morphy, 1, 0, 0,
'', 0, 0, 0,
'',
'maxwidth100');
751 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
754 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
755 print
'<td class="liste_titre">';
756 $listetype = $membertypestatic->liste_array();
757 print
$form->selectarray(
"search_type", $listetype, $search_type, 1, 0, 0,
'', 0, 32);
761 if (!empty($arrayfields[
'd.address'][
'checked'])) {
762 print
'<td class="liste_titre left">';
763 print
'<input class="flat maxwidth75imp" type="text" name="search_address" value="'.dol_escape_htmltag($search_address).
'"></td>';
766 if (!empty($arrayfields[
'd.zip'][
'checked'])) {
767 print
'<td class="liste_titre left">';
768 print
'<input class="flat maxwidth50imp" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).
'"></td>';
770 if (!empty($arrayfields[
'd.town'][
'checked'])) {
771 print
'<td class="liste_titre left">';
772 print
'<input class="flat maxwidth75imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).
'"></td>';
775 if (!empty($arrayfields[
'state.nom'][
'checked'])) {
776 print
'<td class="liste_titre">';
777 print
'<input class="flat searchstring maxwidth75imp" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).
'">';
781 if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
782 print
'<td class="liste_titre center">';
783 print
$form->select_country($search_country,
'search_country',
'', 0,
'minwidth100imp maxwidth100');
787 if (!empty($arrayfields[
'd.phone'][
'checked'])) {
788 print
'<td class="liste_titre left">';
789 print
'<input class="flat maxwidth75imp" type="text" name="search_phone" value="'.dol_escape_htmltag($search_phone).
'"></td>';
792 if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
793 print
'<td class="liste_titre left">';
794 print
'<input class="flat maxwidth50" type="text" name="search_phone_perso" value="'.dol_escape_htmltag($search_phone_perso).
'"></td>';
797 if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
798 print
'<td class="liste_titre left">';
799 print
'<input class="flat maxwidth75imp" type="text" name="search_phone_mobile" value="'.dol_escape_htmltag($search_phone_mobile).
'"></td>';
802 if (!empty($arrayfields[
'd.email'][
'checked'])) {
803 print
'<td class="liste_titre left">';
804 print
'<input class="flat maxwidth75imp" type="text" name="search_email" value="'.dol_escape_htmltag($search_email).
'"></td>';
807 if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
808 print
'<td class="liste_titre center">';
810 $selectarray = array(
'-1'=>
'',
'waitingsubscription'=>$langs->trans(
"WaitingSubscription"),
'uptodate'=>$langs->trans(
"UpToDate"),
'outofdate'=>$langs->trans(
"OutOfDate"));
811 print
$form->selectarray(
'search_filter', $selectarray, $search_filter);
815 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
818 $parameters = array(
'arrayfields'=>$arrayfields);
819 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
820 print $hookmanager->resPrint;
822 if (!empty($arrayfields[
'd.datec'][
'checked'])) {
823 print
'<td class="liste_titre">';
827 if (!empty($arrayfields[
'd.birth'][
'checked'])) {
828 print
'<td class="liste_titre">';
832 if (!empty($arrayfields[
'd.tms'][
'checked'])) {
833 print
'<td class="liste_titre">';
837 if (!empty($arrayfields[
'd.statut'][
'checked'])) {
838 print
'<td class="liste_titre right maxwidthonsmartphone">';
845 print
$form->selectarray(
'search_status', $liststatus, $search_status, -3, 0, 0,
'', 0, 0, 0,
'',
'onrightofpage');
848 if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
849 print
'<td class="liste_titre center">';
850 print
'<input class="flat searchstring maxwidth50" type="text" name="search_import_key" value="'.dol_escape_htmltag($search_import_key).
'">';
853 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
855 print
'<td class="liste_titre middle">';
856 $searchpicto =
$form->showFilterButtons();
862 print
'<tr class="liste_titre">';
863 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
864 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch actioncolumn ');
866 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
869 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
870 print_liste_field_titre($arrayfields[
'd.ref'][
'label'], $_SERVER[
"PHP_SELF"],
'd.ref',
'', $param,
'', $sortfield, $sortorder);
872 if (!empty($arrayfields[
'd.civility'][
'checked'])) {
873 print_liste_field_titre($arrayfields[
'd.civility'][
'label'], $_SERVER[
"PHP_SELF"],
'd.civility',
'', $param,
'', $sortfield, $sortorder);
875 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
876 print_liste_field_titre($arrayfields[
'd.firstname'][
'label'], $_SERVER[
"PHP_SELF"],
'd.firstname',
'', $param,
'', $sortfield, $sortorder);
878 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
879 print_liste_field_titre($arrayfields[
'd.lastname'][
'label'], $_SERVER[
"PHP_SELF"],
'd.lastname',
'', $param,
'', $sortfield, $sortorder);
881 if (!empty($arrayfields[
'd.gender'][
'checked'])) {
882 print_liste_field_titre($arrayfields[
'd.gender'][
'label'], $_SERVER[
'PHP_SELF'],
'd.gender', $param,
"",
"", $sortfield, $sortorder);
884 if (!empty($arrayfields[
'd.company'][
'checked'])) {
885 print_liste_field_titre($arrayfields[
'd.company'][
'label'], $_SERVER[
"PHP_SELF"],
'companyname',
'', $param,
'', $sortfield, $sortorder);
887 if (!empty($arrayfields[
'd.login'][
'checked'])) {
888 print_liste_field_titre($arrayfields[
'd.login'][
'label'], $_SERVER[
"PHP_SELF"],
'd.login',
'', $param,
'', $sortfield, $sortorder);
890 if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
891 print_liste_field_titre($arrayfields[
'd.morphy'][
'label'], $_SERVER[
"PHP_SELF"],
'd.morphy',
'', $param,
'', $sortfield, $sortorder);
893 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
894 print_liste_field_titre($arrayfields[
't.libelle'][
'label'], $_SERVER[
"PHP_SELF"],
't.libelle',
'', $param,
'', $sortfield, $sortorder);
896 if (!empty($arrayfields[
'd.address'][
'checked'])) {
897 print_liste_field_titre($arrayfields[
'd.address'][
'label'], $_SERVER[
"PHP_SELF"],
'd.address',
'', $param,
'', $sortfield, $sortorder);
899 if (!empty($arrayfields[
'd.zip'][
'checked'])) {
900 print_liste_field_titre($arrayfields[
'd.zip'][
'label'], $_SERVER[
"PHP_SELF"],
'd.zip',
'', $param,
'', $sortfield, $sortorder);
902 if (!empty($arrayfields[
'd.town'][
'checked'])) {
903 print_liste_field_titre($arrayfields[
'd.town'][
'label'], $_SERVER[
"PHP_SELF"],
'd.town',
'', $param,
'', $sortfield, $sortorder);
905 if (!empty($arrayfields[
'state.nom'][
'checked'])) {
906 print_liste_field_titre($arrayfields[
'state.nom'][
'label'], $_SERVER[
"PHP_SELF"],
"state.nom",
"", $param,
'', $sortfield, $sortorder);
908 if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
909 print_liste_field_titre($arrayfields[
'country.code_iso'][
'label'], $_SERVER[
"PHP_SELF"],
"country.code_iso",
"", $param,
'', $sortfield, $sortorder,
'center ');
911 if (!empty($arrayfields[
'd.phone'][
'checked'])) {
912 print_liste_field_titre($arrayfields[
'd.phone'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone',
'', $param,
'', $sortfield, $sortorder);
914 if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
915 print_liste_field_titre($arrayfields[
'd.phone_perso'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone_perso',
'', $param,
'', $sortfield, $sortorder);
917 if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
918 print_liste_field_titre($arrayfields[
'd.phone_mobile'][
'label'], $_SERVER[
"PHP_SELF"],
'd.phone_mobile',
'', $param,
'', $sortfield, $sortorder);
920 if (!empty($arrayfields[
'd.email'][
'checked'])) {
921 print_liste_field_titre($arrayfields[
'd.email'][
'label'], $_SERVER[
"PHP_SELF"],
'd.email',
'', $param,
'', $sortfield, $sortorder);
923 if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
924 print_liste_field_titre($arrayfields[
'd.datefin'][
'label'], $_SERVER[
"PHP_SELF"],
'd.datefin,t.subscription',
'', $param,
'', $sortfield, $sortorder,
'center ');
927 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
930 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
931 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
932 print $hookmanager->resPrint;
933 if (!empty($arrayfields[
'd.datec'][
'checked'])) {
934 print_liste_field_titre($arrayfields[
'd.datec'][
'label'], $_SERVER[
"PHP_SELF"],
"d.datec",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
936 if (!empty($arrayfields[
'd.birth'][
'checked'])) {
937 print_liste_field_titre($arrayfields[
'd.birth'][
'label'], $_SERVER[
"PHP_SELF"],
"d.birth",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
939 if (!empty($arrayfields[
'd.tms'][
'checked'])) {
940 print_liste_field_titre($arrayfields[
'd.tms'][
'label'], $_SERVER[
"PHP_SELF"],
"d.tms",
"", $param,
'align="center" class="nowrap"', $sortfield, $sortorder);
942 if (!empty($arrayfields[
'd.statut'][
'checked'])) {
943 print_liste_field_titre($arrayfields[
'd.statut'][
'label'], $_SERVER[
"PHP_SELF"],
"d.statut,t.subscription,d.datefin",
"", $param,
'class="right"', $sortfield, $sortorder);
945 if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
946 print_liste_field_titre($arrayfields[
'd.import_key'][
'label'], $_SERVER[
"PHP_SELF"],
"d.import_key",
"", $param,
'', $sortfield, $sortorder,
'center ');
948 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
949 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'align="center"', $sortfield, $sortorder,
'maxwidthsearch ');
954 $totalarray = array();
955 $totalarray[
'nbfield'] = 0;
956 while ($i < min($num, $limit)) {
957 $obj = $db->fetch_object(
$resql);
959 $datefin = $db->jdate($obj->datefin);
961 $memberstatic->id = $obj->rowid;
962 $memberstatic->ref = $obj->ref;
963 $memberstatic->civility_id = $obj->civility;
964 $memberstatic->login = $obj->login;
965 $memberstatic->lastname = $obj->lastname;
966 $memberstatic->firstname = $obj->firstname;
967 $memberstatic->gender = $obj->gender;
968 $memberstatic->statut = $obj->statut;
969 $memberstatic->datefin = $datefin;
970 $memberstatic->socid = $obj->fk_soc;
971 $memberstatic->photo = $obj->photo;
972 $memberstatic->email = $obj->email;
973 $memberstatic->morphy = $obj->morphy;
974 $memberstatic->note_public = $obj->note_public;
975 $memberstatic->note_private = $obj->note_private;
976 $memberstatic->need_subscription = $obj->subscription;
978 if (!empty($obj->fk_soc)) {
979 $memberstatic->fetch_thirdparty();
980 if ($memberstatic->thirdparty->id > 0) {
981 $companyname = $memberstatic->thirdparty->name;
982 $companynametoshow = $memberstatic->thirdparty->getNomUrl(1);
985 $companyname = $obj->company;
986 $companynametoshow = $obj->company;
988 $memberstatic->company = $companyname;
990 print
'<tr class="oddeven">';
993 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
994 print
'<td class="center">';
995 if ($massactionbutton || $massaction) {
997 if (in_array($obj->rowid, $arrayofselected)) {
1000 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1005 if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
1006 print
'<td class="center" data-key="id">'.$obj->rowid.
'</td>';
1008 $totalarray[
'nbfield']++;
1013 if (!empty($arrayfields[
'd.ref'][
'checked'])) {
1015 print $memberstatic->getNomUrl(-1, 0,
'card',
'ref',
'', -1, 0, 1);
1018 $totalarray[
'nbfield']++;
1022 if (!empty($arrayfields[
'd.civility'][
'checked'])) {
1024 print $obj->civility;
1027 $totalarray[
'nbfield']++;
1031 if (!empty($arrayfields[
'd.firstname'][
'checked'])) {
1032 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->firstname).
'">';
1033 print $memberstatic->getNomUrl(0, 0,
'card',
'firstname');
1037 $totalarray[
'nbfield']++;
1041 if (!empty($arrayfields[
'd.lastname'][
'checked'])) {
1042 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->lastname).
'">';
1043 print $memberstatic->getNomUrl(0, 0,
'card',
'lastname');
1047 $totalarray[
'nbfield']++;
1051 if (!empty($arrayfields[
'd.gender'][
'checked'])) {
1054 print $langs->trans(
"Gender".$obj->gender);
1058 $totalarray[
'nbfield']++;
1062 if (!empty($arrayfields[
'd.company'][
'checked'])) {
1063 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($companyname).
'">';
1064 print $companynametoshow;
1068 if (!empty($arrayfields[
'd.login'][
'checked'])) {
1069 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->login).
'">'.$obj->login.
"</td>\n";
1071 $totalarray[
'nbfield']++;
1075 if (!empty($arrayfields[
'd.morphy'][
'checked'])) {
1076 print
'<td class="center">';
1077 print $memberstatic->getmorphylib(
'', 2);
1080 $totalarray[
'nbfield']++;
1084 if (!empty($arrayfields[
't.libelle'][
'checked'])) {
1085 $membertypestatic->id = $obj->type_id;
1086 $membertypestatic->label = $obj->type;
1087 print
'<td class="nowraponall">';
1088 print $membertypestatic->getNomUrl(1, 32);
1091 $totalarray[
'nbfield']++;
1095 if (!empty($arrayfields[
'd.address'][
'checked'])) {
1096 print
'<td class="nocellnopadd tdoverflowmax200" title="'.dol_escape_htmltag($obj->address).
'">';
1097 print $obj->address;
1100 $totalarray[
'nbfield']++;
1104 if (!empty($arrayfields[
'd.zip'][
'checked'])) {
1105 print
'<td class="nocellnopadd">';
1109 $totalarray[
'nbfield']++;
1113 if (!empty($arrayfields[
'd.town'][
'checked'])) {
1114 print
'<td class="nocellnopadd">';
1118 $totalarray[
'nbfield']++;
1122 if (!empty($arrayfields[
'state.nom'][
'checked'])) {
1123 print
"<td>".$obj->state_name.
"</td>\n";
1125 $totalarray[
'nbfield']++;
1129 if (!empty($arrayfields[
'country.code_iso'][
'checked'])) {
1130 $tmparray =
getCountry($obj->country,
'all');
1131 print
'<td class="center tdoverflowmax100" title="'.dol_escape_htmltag($tmparray[
'label']).
'">';
1135 $totalarray[
'nbfield']++;
1139 if (!empty($arrayfields[
'd.phone'][
'checked'])) {
1140 print
'<td class="nocellnopadd">';
1144 $totalarray[
'nbfield']++;
1148 if (!empty($arrayfields[
'd.phone_perso'][
'checked'])) {
1149 print
'<td class="nocellnopadd">';
1150 print $obj->phone_perso;
1153 $totalarray[
'nbfield']++;
1157 if (!empty($arrayfields[
'd.phone_mobile'][
'checked'])) {
1158 print
'<td class="nocellnopadd">';
1159 print $obj->phone_mobile;
1162 $totalarray[
'nbfield']++;
1166 if (!empty($arrayfields[
'd.email'][
'checked'])) {
1167 print
'<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->email).
'">';
1172 $datefin = $db->jdate($obj->datefin);
1173 if (!empty($arrayfields[
'd.datefin'][
'checked'])) {
1174 print
'<td class="nowrap center">';
1177 if ($memberstatic->hasDelay()) {
1178 $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").
')';
1179 print
" ".img_warning($langs->trans(
"SubscriptionLate").$textlate);
1182 if (!empty($obj->subscription)) {
1183 print
'<span class="opacitymedium">'.$langs->trans(
"SubscriptionNotReceived").
'</span>';
1184 if ($obj->statut > 0) {
1185 print
" ".img_warning();
1194 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1196 $parameters = array(
'arrayfields'=>$arrayfields,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
1197 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
1198 print $hookmanager->resPrint;
1200 if (!empty($arrayfields[
'd.datec'][
'checked'])) {
1201 print
'<td class="nowrap center">';
1202 print
dol_print_date($db->jdate($obj->date_creation),
'dayhour',
'tzuser');
1205 $totalarray[
'nbfield']++;
1209 if (!empty($arrayfields[
'd.birth'][
'checked'])) {
1210 print
'<td class="nowrap center">';
1214 $totalarray[
'nbfield']++;
1218 if (!empty($arrayfields[
'd.tms'][
'checked'])) {
1219 print
'<td class="nowrap center">';
1220 print
dol_print_date($db->jdate($obj->date_update),
'dayhour',
'tzuser');
1223 $totalarray[
'nbfield']++;
1227 if (!empty($arrayfields[
'd.statut'][
'checked'])) {
1228 print
'<td class="nowrap right">';
1229 print $memberstatic->LibStatut($obj->statut, $obj->subscription, $datefin, 5);
1232 $totalarray[
'nbfield']++;
1235 if (!empty($arrayfields[
'd.import_key'][
'checked'])) {
1236 print
'<td class="tdoverflowmax100 center" title="'.dol_escape_htmltag($obj->import_key).
'">';
1240 $totalarray[
'nbfield']++;
1244 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
1245 print
'<td class="center">';
1246 if ($massactionbutton || $massaction) {
1248 if (in_array($obj->rowid, $arrayofselected)) {
1251 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1256 $totalarray[
'nbfield']++;
1264 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1270 foreach ($arrayfields as $key => $val) {
1271 if (!empty($val[
'checked'])) {
1275 print
'<tr><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</td></tr>';
1280 $parameters = array(
'sql' => $sql);
1281 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters);
1282 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.