31require
'../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/adherents/class/subscription.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
39$langs->loadLangs(array(
"companies",
"members"));
45$hookmanager->initHooks(array(
'membersindex'));
56$userid =
GETPOST(
'userid',
'int');
59 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
60 $zone =
GETPOST(
'areacode',
'int');
61 $boxorder =
GETPOST(
'boxorder',
'aZ09');
62 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
79llxHeader(
'', $langs->trans(
"Members"),
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder');
85print
load_fiche_titre($langs->trans(
"MembersArea"), $resultboxes[
'selectboxlist'],
'members');
92if ($conf->use_javascript_ajax) {
94 $numberyears =
getDolGlobalInt(
"MAIN_NB_OF_YEAR_IN_MEMBERSHIP_WIDGET_GRAPH");
96 $boxgraph .=
'<div class="div-table-responsive-no-min">';
97 $boxgraph .=
'<table class="noborder nohover centpercent">';
98 $boxgraph .=
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"Statistics").($numberyears ?
' ('.($year-$numberyears).
' - '.$year.
')' :
'').
'</th></tr>';
99 $boxgraph .=
'<tr><td class="center" colspan="2">';
101 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherentstats.class.php';
105 $sumMembers = $stats->countMembersByTypeAndStatus($numberyears);
106 if (is_array($sumMembers) && !empty($sumMembers)) {
107 $total = $sumMembers[
'total'][
'members_draft'] + $sumMembers[
'total'][
'members_pending'] + $sumMembers[
'total'][
'members_uptodate'] + $sumMembers[
'total'][
'members_expired'] + $sumMembers[
'total'][
'members_excluded'] + $sumMembers[
'total'][
'members_resiliated'];
111 foreach (array(
'members_draft',
'members_pending',
'members_uptodate',
'members_expired',
'members_excluded',
'members_resiliated') as $val) {
112 if (empty($sumMembers[
'total'][$val])) {
113 $sumMembers[
'total'][$val] = 0;
117 $dataseries = array();
118 $dataseries[] = array($langs->transnoentitiesnoconv(
"MembersStatusToValid"), $sumMembers[
'total'][
'members_draft']);
119 $dataseries[] = array($langs->transnoentitiesnoconv(
"WaitingSubscription"), $sumMembers[
'total'][
'members_pending']);
120 $dataseries[] = array($langs->transnoentitiesnoconv(
"UpToDate"), $sumMembers[
'total'][
'members_uptodate']);
121 $dataseries[] = array($langs->transnoentitiesnoconv(
"OutOfDate"), $sumMembers[
'total'][
'members_expired']);
122 $dataseries[] = array($langs->transnoentitiesnoconv(
"MembersStatusExcluded"), $sumMembers[
'total'][
'members_excluded']);
123 $dataseries[] = array($langs->transnoentitiesnoconv(
"MembersStatusResiliated"), $sumMembers[
'total'][
'members_resiliated']);
125 include DOL_DOCUMENT_ROOT.
'/theme/'.$conf->theme.
'/theme_vars.inc.php';
127 include_once DOL_DOCUMENT_ROOT.
'/core/class/dolgraph.class.php';
129 $dolgraph->SetData($dataseries);
130 $dolgraph->SetDataColor(array(
'-'.$badgeStatus0, $badgeStatus1, $badgeStatus4, $badgeStatus8,
'-'.$badgeStatus8, $badgeStatus6));
131 $dolgraph->setShowLegend(2);
132 $dolgraph->setShowPercent(1);
133 $dolgraph->SetType(array(
'pie'));
134 $dolgraph->setHeight(
'200');
135 $dolgraph->draw(
'idgraphstatus');
136 $boxgraph .=$dolgraph->show($total ? 0 : 1);
138 $boxgraph .=
'</td></tr>';
139 $boxgraph .=
'<tr class="liste_total"><td>'.$langs->trans(
"Total").
'</td><td class="right">';
141 $boxgraph .=
'</td></tr>';
142 $boxgraph .=
'</table>';
143 $boxgraph .=
'</div>';
148print
'<div class="clearboth"></div>';
149print
'<div class="fichecenter fichecenterbis">';
151print
'<div class="twocolumns">';
153print
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
157print $resultboxes[
'boxlista'];
161print
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
163print $resultboxes[
'boxlistb'];
170$parameters = array(
'user' => $user);
171$reshook = $hookmanager->executeHooks(
'dashboardMembers', $parameters, $object);
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.
Class to manage statistics of members.
Class to manage members type.
static saveboxorder($dbs, $zone, $boxorder, $userid=0)
Save order of boxes for area and user.
Class to manage subscriptions of foundation members.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
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.