35 global $db, $langs, $conf, $user;
40 $head[$h][0] = DOL_URL_ROOT.
'/adherents/card.php?rowid='.$object->id;
41 $head[$h][1] = $langs->trans(
"Member");
42 $head[$h][2] =
'general';
45 if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_MEMBER_ACTIVE))
46 && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) {
49 $head[$h][0] = DOL_URL_ROOT.
'/adherents/ldap.php?id='.$object->id;
50 $head[$h][1] = $langs->trans(
"LDAPCard");
51 $head[$h][2] =
'ldap';
55 if (!empty($user->rights->adherent->cotisation->lire)) {
56 $nbSubscription = is_array($object->subscriptions) ?count($object->subscriptions) : 0;
57 $head[$h][0] = DOL_URL_ROOT.
'/adherents/subscription.php?rowid='.$object->id;
58 $head[$h][1] = $langs->trans(
"Subscriptions");
59 $head[$h][2] =
'subscription';
60 if ($nbSubscription > 0) {
61 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbSubscription.
'</span>';
67 if (!empty($user->rights->partnership->read)) {
68 $nbPartnership = is_array($object->partnerships) ? count($object->partnerships) : 0;
69 $head[$h][0] = DOL_URL_ROOT.
'/partnership/partnership_list.php?rowid='.$object->id;
70 $head[$h][1] = $langs->trans(
"Partnerships");
72 $sql =
"SELECT COUNT(n.rowid) as nb";
73 $sql .=
" FROM ".MAIN_DB_PREFIX.
"partnership as n";
74 $sql .=
" WHERE fk_member = ".((int) $object->id);
77 $obj = $db->fetch_object(
$resql);
83 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
85 $head[$h][2] =
'partnerships';
86 if ($nbPartnership > 0) {
87 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbPartnership.
'</span>';
100 if (!empty($object->note_private)) {
103 if (!empty($object->note_public)) {
106 $head[$h][0] = DOL_URL_ROOT.
'/adherents/note.php?id='.$object->id;
107 $head[$h][1] = $langs->trans(
"Note");
108 $head[$h][2] =
'note';
110 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
115 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
116 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
117 $upload_dir = $conf->adherent->multidir_output[$object->entity].
'/'.
get_exdir(0, 0, 0, 1, $object,
'member');
118 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
119 $nbLinks =
Link::count($db, $object->element, $object->id);
120 $head[$h][0] = DOL_URL_ROOT.
'/adherents/document.php?id='.$object->id;
121 $head[$h][1] = $langs->trans(
'Documents');
122 if (($nbFiles + $nbLinks) > 0) {
123 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
125 $head[$h][2] =
'document';
130 $head[$h][0] = DOL_URL_ROOT.
"/adherents/agenda.php?id=".$object->id;
131 $head[$h][1] = $langs->trans(
"Events");
132 if (
isModEnabled(
'agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
134 $head[$h][1] .= $langs->trans(
"Agenda");
136 $head[$h][2] =
'agenda';
155 global $langs, $conf, $user;
160 $head[$h][0] = DOL_URL_ROOT.
'/adherents/type.php?rowid='.$object->id;
161 $head[$h][1] = $langs->trans(
"MemberType");
162 $head[$h][2] =
'card';
167 $head[$h][0] = DOL_URL_ROOT.
"/adherents/type_translation.php?rowid=".$object->id;
168 $head[$h][1] = $langs->trans(
"Translation");
169 $head[$h][2] =
'translation';
173 if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE))
174 && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin))) {
175 $langs->load(
"ldap");
177 $head[$h][0] = DOL_URL_ROOT.
'/adherents/type_ldap.php?rowid='.$object->id;
178 $head[$h][1] = $langs->trans(
"LDAPCard");
179 $head[$h][2] =
'ldap';
201 global $langs, $conf, $user, $db;
204 $extrafields->fetch_name_optionals_label(
'adherent');
205 $extrafields->fetch_name_optionals_label(
'adherent_type');
210 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/member.php';
211 $head[$h][1] = $langs->trans(
"Miscellaneous");
212 $head[$h][2] =
'general';
215 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/member_emails.php';
216 $head[$h][1] = $langs->trans(
"EMails");
217 $head[$h][2] =
'emails';
226 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/member_extrafields.php';
227 $head[$h][1] = $langs->trans(
"ExtraFieldsMember");
228 $nbExtrafields = $extrafields->attributes[
'adherent'][
'count'];
229 if ($nbExtrafields > 0) {
230 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
232 $head[$h][2] =
'attributes';
235 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/member_type_extrafields.php';
236 $head[$h][1] = $langs->trans(
"ExtraFieldsMemberType");
237 $nbExtrafields = $extrafields->attributes[
'adherent_type'][
'count'];
238 if ($nbExtrafields > 0) {
239 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
241 $head[$h][2] =
'attributes_type';
244 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/website.php';
245 $head[$h][1] = $langs->trans(
"BlankSubscriptionForm");
246 $head[$h][2] =
'website';
263 global $langs, $conf, $user;
268 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/index.php';
269 $head[$h][1] = $langs->trans(
"Subscriptions");
270 $head[$h][2] =
'statssubscription';
273 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/geo.php?mode=memberbycountry';
274 $head[$h][1] = $langs->trans(
"Country");
275 $head[$h][2] =
'statscountry';
278 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/geo.php?mode=memberbyregion';
279 $head[$h][1] = $langs->trans(
"Region");
280 $head[$h][2] =
'statsregion';
283 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/geo.php?mode=memberbystate';
284 $head[$h][1] = $langs->trans(
"State");
285 $head[$h][2] =
'statsstate';
288 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/geo.php?mode=memberbytown';
289 $head[$h][1] = $langs->trans(
'Town');
290 $head[$h][2] =
'statstown';
293 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/byproperties.php';
294 $head[$h][1] = $langs->trans(
'ByProperties');
295 $head[$h][2] =
'statsbyproperties';
317 global $db, $langs, $conf, $user;
322 $head[$h][0] = DOL_URL_ROOT.
'/adherents/subscription/card.php?rowid='.$object->id;
323 $head[$h][1] = $langs->trans(
"Subscription");
324 $head[$h][2] =
'general';
327 $head[$h][0] = DOL_URL_ROOT.
'/adherents/subscription/info.php?rowid='.$object->id;
328 $head[$h][1] = $langs->trans(
"Info");
329 $head[$h][2] =
'info';
Class to manage members of a foundation.
Class to manage members type.
static count($dbs, $objecttype, $objectid)
Return nb of links.
Class to manage subscriptions of foundation members.
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.
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
isModEnabled($module)
Is Dolibarr module enabled.
get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart='')
Return a path to have a the directory according to object where files are stored.
subscription_prepare_head(Subscription $object)
Return array head with list of tabs to view object informations.
member_prepare_head(Adherent $object)
Return array head with list of tabs to view object informations.
member_type_prepare_head(AdherentType $object)
Return array head with list of tabs to view object informations.
member_admin_prepare_head()
Return array head with list of tabs to view object informations.
member_stats_prepare_head($object)
Return array head with list of tabs to view object stats informations.