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)))
50 $head[$h][0] = DOL_URL_ROOT.
'/adherents/ldap.php?id='.$object->id;
51 $head[$h][1] = $langs->trans(
"LDAPCard");
52 $head[$h][2] =
'ldap';
56 if (!empty($user->rights->adherent->cotisation->lire))
58 $nbSubscription = is_array($object->subscriptions) ?count($object->subscriptions) : 0;
59 $head[$h][0] = DOL_URL_ROOT.
'/adherents/subscription.php?rowid='.$object->id;
60 $head[$h][1] = $langs->trans(
"Subscriptions");
61 $head[$h][2] =
'subscription';
62 if ($nbSubscription > 0) $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbSubscription.
'</span>';
73 if (!empty($object->note)) $nbNote++;
74 if (!empty($object->note_private)) $nbNote++;
75 if (!empty($object->note_public)) $nbNote++;
76 $head[$h][0] = DOL_URL_ROOT.
'/adherents/note.php?id='.$object->id;
77 $head[$h][1] = $langs->trans(
"Note");
78 $head[$h][2] =
'note';
79 if ($nbNote > 0) $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
83 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
84 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
85 $upload_dir = $conf->adherent->multidir_output[$object->entity].
'/'.
get_exdir(0, 0, 0, 1, $object,
'member');
86 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
87 $nbLinks =
Link::count($db, $object->element, $object->id);
88 $head[$h][0] = DOL_URL_ROOT.
'/adherents/document.php?id='.$object->id;
89 $head[$h][1] = $langs->trans(
'Documents');
90 if (($nbFiles + $nbLinks) > 0) $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
91 $head[$h][2] =
'document';
95 if (!empty($conf->agenda->enabled))
97 $head[$h][0] = DOL_URL_ROOT.
"/adherents/agenda.php?id=".$object->id;
98 $head[$h][1] = $langs->trans(
"Events");
99 if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read)))
102 $head[$h][1] .= $langs->trans(
"Agenda");
104 $head[$h][2] =
'agenda';
121 global $langs, $conf, $user;
126 $head[$h][0] = DOL_URL_ROOT.
'/adherents/type.php?rowid='.$object->id;
127 $head[$h][1] = $langs->trans(
"MemberType");
128 $head[$h][2] =
'card';
132 if (!empty($conf->global->MAIN_MULTILANGS))
134 $head[$h][0] = DOL_URL_ROOT.
"/adherents/type_translation.php?rowid=".$object->id;
135 $head[$h][1] = $langs->trans(
"Translation");
136 $head[$h][2] =
'translation';
140 if ((!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE))
141 && (empty($conf->global->MAIN_DISABLE_LDAP_TAB) || !empty($user->admin)))
143 $langs->load(
"ldap");
145 $head[$h][0] = DOL_URL_ROOT.
'/adherents/type_ldap.php?rowid='.$object->id;
146 $head[$h][1] = $langs->trans(
"LDAPCard");
147 $head[$h][2] =
'ldap';
169 global $langs, $conf, $user;
174 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/adherent.php';
175 $head[$h][1] = $langs->trans(
"Miscellaneous");
176 $head[$h][2] =
'general';
179 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/adherent_emails.php';
180 $head[$h][1] = $langs->trans(
"EMails");
181 $head[$h][2] =
'emails';
190 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/adherent_extrafields.php';
191 $head[$h][1] = $langs->trans(
"ExtraFieldsMember");
192 $head[$h][2] =
'attributes';
195 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/adherent_type_extrafields.php';
196 $head[$h][1] = $langs->trans(
"ExtraFieldsMemberType");
197 $head[$h][2] =
'attributes_type';
200 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/website.php';
201 $head[$h][1] = $langs->trans(
"BlankSubscriptionForm");
202 $head[$h][2] =
'website';
219 global $langs, $conf, $user;
224 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/index.php';
225 $head[$h][1] = $langs->trans(
"Subscriptions");
226 $head[$h][2] =
'statssubscription';
229 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/geo.php?mode=memberbycountry';
230 $head[$h][1] = $langs->trans(
"Country");
231 $head[$h][2] =
'statscountry';
234 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/geo.php?mode=memberbyregion';
235 $head[$h][1] = $langs->trans(
"Region");
236 $head[$h][2] =
'statsregion';
239 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/geo.php?mode=memberbystate';
240 $head[$h][1] = $langs->trans(
"State");
241 $head[$h][2] =
'statsstate';
244 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/geo.php?mode=memberbytown';
245 $head[$h][1] = $langs->trans(
'Town');
246 $head[$h][2] =
'statstown';
249 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/byproperties.php';
250 $head[$h][1] = $langs->trans(
'ByProperties');
251 $head[$h][2] =
'statsbyproperties';
273 global $db, $langs, $conf, $user;
278 $head[$h][0] = DOL_URL_ROOT.
'/adherents/subscription/card.php?rowid='.$object->id;
279 $head[$h][1] = $langs->trans(
"Subscription");
280 $head[$h][2] =
'general';
283 $head[$h][0] = DOL_URL_ROOT.
'/adherents/subscription/info.php?rowid='.$object->id;
284 $head[$h][1] = $langs->trans(
"Info");
285 $head[$h][2] =
'info';
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_prepare_head(Adherent $object)
Return array head with list of tabs to view object informations.
subscription_prepare_head(Subscription $object)
Return array head with list of tabs to view object informations.
get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart= '')
Return a path to have a the directory according to object where files are stored. ...
Class to manage members of a foundation.
member_stats_prepare_head($object)
Return array head with list of tabs to view object stats informations.
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0)
Scan a directory and return a list of files/directories.
Class to manage members type.
Class to manage subscriptions of foundation members.
static count($db, $objecttype, $objectid)
Return nb of links.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode= 'add')
Complete or removed entries into a head array (used to build tabs).