36 global $db, $langs, $conf, $user;
41 $head[$h][0] = DOL_URL_ROOT.
'/adherents/card.php?rowid='.
$object->id;
42 $head[$h][1] = $langs->trans(
"Member");
43 $head[$h][2] =
'general';
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 ($user->hasRight(
'adherent',
'cotisation',
'lire')) {
57 $nbSubscription = is_array(
$object->subscriptions) ? count(
$object->subscriptions) : 0;
58 $head[$h][0] = DOL_URL_ROOT.
'/adherents/subscription.php?rowid='.
$object->id;
59 $head[$h][1] = $langs->trans(
"Subscriptions");
60 $head[$h][2] =
'subscription';
61 if ($nbSubscription > 0) {
62 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbSubscription.
'</span>';
68 if ($user->hasRight(
'partnership',
'read')) {
69 $nbPartnership = is_array(
$object->partnerships) ? count(
$object->partnerships) : 0;
70 $head[$h][0] = DOL_URL_ROOT.
'/partnership/partnership_list.php?rowid='.
$object->id;
71 $head[$h][1] = $langs->trans(
"Partnerships");
73 $sql =
"SELECT COUNT(n.rowid) as nb";
74 $sql .=
" FROM ".MAIN_DB_PREFIX.
"partnership as n";
75 $sql .=
" WHERE fk_member = ".((int)
$object->id);
76 $resql = $db->query($sql);
78 $obj = $db->fetch_object($resql);
84 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
86 $head[$h][2] =
'partnerships';
87 if ($nbPartnership > 0) {
88 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbPartnership.
'</span>';
101 if (!empty(
$object->note_private)) {
104 if (!empty(
$object->note_public)) {
107 $head[$h][0] = DOL_URL_ROOT.
'/adherents/note.php?id='.
$object->id;
108 $head[$h][1] = $langs->trans(
"Note");
109 $head[$h][2] =
'note';
111 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
116 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
117 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
119 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
121 $head[$h][0] = DOL_URL_ROOT.
'/adherents/document.php?id='.
$object->id;
122 $head[$h][1] = $langs->trans(
'Documents');
123 if (($nbFiles + $nbLinks) > 0) {
124 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
126 $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') && ($user->hasRight(
'agenda',
'myactions',
'read') || $user->hasRight(
'agenda',
'allactions',
'read'))) {
135 require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
136 $cachekey =
'count_events_member_'.$object->id;
138 if (!is_null($dataretrieved)) {
139 $nbEvent = $dataretrieved;
141 $sql =
"SELECT COUNT(id) as nb";
142 $sql .=
" FROM ".MAIN_DB_PREFIX.
"actioncomm";
143 $sql .=
" WHERE elementtype = 'member' AND fk_element = ".((int)
$object->id);
144 $resql = $db->query($sql);
146 $obj = $db->fetch_object($resql);
149 dol_syslog(
'Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
155 $head[$h][1] .= $langs->trans(
"Agenda");
157 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbEvent.
'</span>';
160 $head[$h][2] =
'agenda';
178 global $langs, $conf, $user;
183 $head[$h][0] = DOL_URL_ROOT.
'/adherents/type.php?rowid='.
$object->id;
184 $head[$h][1] = $langs->trans(
"MemberType");
185 $head[$h][2] =
'card';
190 $head[$h][0] = DOL_URL_ROOT.
"/adherents/type_translation.php?rowid=".
$object->id;
191 $head[$h][1] = $langs->trans(
"Translation");
192 $head[$h][2] =
'translation';
198 $langs->load(
"ldap");
200 $head[$h][0] = DOL_URL_ROOT.
'/adherents/type_ldap.php?rowid='.
$object->id;
201 $head[$h][1] = $langs->trans(
"LDAPCard");
202 $head[$h][2] =
'ldap';
224 global $langs, $conf, $user, $db;
227 $extrafields->fetch_name_optionals_label(
'adherent');
228 $extrafields->fetch_name_optionals_label(
'adherent_type');
233 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/member.php';
234 $head[$h][1] = $langs->trans(
"Miscellaneous");
235 $head[$h][2] =
'general';
238 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/member_emails.php';
239 $head[$h][1] = $langs->trans(
"EMails");
240 $head[$h][2] =
'emails';
249 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/member_extrafields.php';
250 $head[$h][1] = $langs->trans(
"ExtraFieldsMember");
251 $nbExtrafields = $extrafields->attributes[
'adherent'][
'count'];
252 if ($nbExtrafields > 0) {
253 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
255 $head[$h][2] =
'attributes';
258 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/member_type_extrafields.php';
259 $head[$h][1] = $langs->trans(
"ExtraFieldsMemberType");
260 $nbExtrafields = $extrafields->attributes[
'adherent_type'][
'count'];
261 if ($nbExtrafields > 0) {
262 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
264 $head[$h][2] =
'attributes_type';
267 $head[$h][0] = DOL_URL_ROOT.
'/adherents/admin/website.php';
268 $head[$h][1] = $langs->trans(
"BlankSubscriptionForm");
269 $head[$h][2] =
'website';
286 global $langs, $conf, $user;
291 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/index.php';
292 $head[$h][1] = $langs->trans(
"Subscriptions");
293 $head[$h][2] =
'statssubscription';
296 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/geo.php?mode=memberbycountry';
297 $head[$h][1] = $langs->trans(
"Country");
298 $head[$h][2] =
'statscountry';
301 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/geo.php?mode=memberbyregion';
302 $head[$h][1] = $langs->trans(
"Region");
303 $head[$h][2] =
'statsregion';
306 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/geo.php?mode=memberbystate';
307 $head[$h][1] = $langs->trans(
"State");
308 $head[$h][2] =
'statsstate';
311 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/geo.php?mode=memberbytown';
312 $head[$h][1] = $langs->trans(
'Town');
313 $head[$h][2] =
'statstown';
316 $head[$h][0] = DOL_URL_ROOT.
'/adherents/stats/byproperties.php';
317 $head[$h][1] = $langs->trans(
'ByProperties');
318 $head[$h][2] =
'statsbyproperties';
340 global $db, $langs, $conf, $user;
345 $head[$h][0] = DOL_URL_ROOT.
'/adherents/subscription/card.php?rowid='.
$object->id;
346 $head[$h][1] = $langs->trans(
"Subscription");
347 $head[$h][2] =
'general';
350 $head[$h][0] = DOL_URL_ROOT.
'/adherents/subscription/info.php?rowid='.
$object->id;
351 $head[$h][1] = $langs->trans(
"Info");
352 $head[$h][2] =
'info';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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.
dol_dir_list($utf8_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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart='')
Return a path to have a the directory according to object where files are stored.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
subscription_prepare_head(Subscription $object)
Return array head with list of tabs to view object information.
member_prepare_head(Adherent $object)
Return array head with list of tabs to view object information.
member_type_prepare_head(AdherentType $object)
Return array head with list of tabs to view object information.
member_admin_prepare_head()
Return array head with list of tabs to view object information.
member_stats_prepare_head($object)
Return array head with list of tabs to view object stats information.
dol_setcache($memoryid, $data, $expire=0)
Save data into a memory area shared by all users, all sessions on server.
dol_getcache($memoryid)
Read a memory area shared by all users, all sessions on server.