33require
'../main.inc.php';
41require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
43require_once DOL_DOCUMENT_ROOT.
'/adherents/class/subscription.class.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/lib/dashboard.lib.php';
48$langs->loadLangs(array(
"companies",
"members"));
51$hookmanager->initHooks(array(
'membersindex'));
63include DOL_DOCUMENT_ROOT.
'/core/actions_addbox.inc.php';
75$title = $langs->trans(
"Members");
76$help_url =
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
78llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-member page-index');
84print
load_fiche_titre($langs->trans(
"MembersArea"), $resultboxes[
'selectboxlist'],
'members');
91if (
$conf->use_javascript_ajax) {
93 $numberyears =
getDolGlobalInt(
"MAIN_NB_OF_YEAR_IN_MEMBERSHIP_WIDGET_GRAPH");
95 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherentstats.class.php';
99 $sumMembers = $stats->countMembersByTypeAndStatus($numberyears);
100 foreach (array(
'members_draft',
'members_pending',
'members_uptodate',
'members_expired',
'members_excluded',
'members_resiliated') as $val) {
101 if (empty($sumMembers[
'total'][$val])) {
102 $sumMembers[
'total'][$val] = 0;
108 array(
'label' => $langs->transnoentitiesnoconv(
"MembersStatusToValid"),
'nb' => $sumMembers[
'total'][
'members_draft'],
'color' =>
'-'.$colors[0]),
109 array(
'label' => $langs->transnoentitiesnoconv(
"WaitingSubscription"),
'nb' => $sumMembers[
'total'][
'members_pending'],
'color' => $colors[1]),
110 array(
'label' => $langs->transnoentitiesnoconv(
"UpToDate"),
'nb' => $sumMembers[
'total'][
'members_uptodate'],
'color' => $colors[4]),
111 array(
'label' => $langs->transnoentitiesnoconv(
"OutOfDate"),
'nb' => $sumMembers[
'total'][
'members_expired'],
'color' => $colors[8]),
112 array(
'label' => $langs->transnoentitiesnoconv(
"MembersStatusExcluded"),
'nb' => $sumMembers[
'total'][
'members_excluded'],
'color' =>
'-'.$colors[8]),
113 array(
'label' => $langs->transnoentitiesnoconv(
"MembersStatusResiliated"),
'nb' => $sumMembers[
'total'][
'members_resiliated'],
'color' => $colors[6]),
116 $boxgraph .=
getStatusPieChart($langs->trans(
"Statistics").
' - '.$langs->trans(
"Status").
' '.($numberyears ?
' ('.($year - $numberyears).
' - '.$year.
')' :
''), $series);
120print
'<div class="clearboth"></div>';
121print
'<div class="fichecenter fichecenterbis">';
123print
'<div class="twocolumns">';
125print
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
129print $resultboxes[
'boxlista'];
133print
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
135print $resultboxes[
'boxlistb'];
142$parameters = array(
'user' => $user);
143$reshook = $hookmanager->executeHooks(
'dashboardMembers', $parameters, $object);
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage members of a foundation.
Class to manage statistics of members.
Class to manage members type.
Class to manage subscriptions of foundation members.
getThemeBadgeStatusColors()
Return the colors of status badges defined by the current theme (theme_vars.inc.php)
getStatusPieChart($title, $series, $options=array())
Return the HTML table with a pie chart of values by status, as shown on the home page of a module.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $nodie=0, $mode='')
Check permissions of a user to show a page and an object.