32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/adherents/class/subscription.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
40$langs->loadLangs(array(
"companies",
"members"));
46$hookmanager->initHooks(array(
'membersindex'));
60 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
62 $boxorder =
GETPOST(
'boxorder',
'aZ09');
63 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
80llxHeader(
'', $langs->trans(
"Members"),
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder');
86print
load_fiche_titre($langs->trans(
"MembersArea"), $resultboxes[
'selectboxlist'],
'members');
93if ($conf->use_javascript_ajax) {
95 $numberyears =
getDolGlobalInt(
"MAIN_NB_OF_YEAR_IN_MEMBERSHIP_WIDGET_GRAPH");
97 $boxgraph .=
'<div class="div-table-responsive-no-min">';
98 $boxgraph .=
'<table class="noborder nohover centpercent">';
99 $boxgraph .=
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"Statistics").($numberyears ?
' ('.($year - $numberyears).
' - '.$year.
')' :
'').
'</th></tr>';
100 $boxgraph .=
'<tr><td class="center" colspan="2">';
102 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherentstats.class.php';
106 $sumMembers = $stats->countMembersByTypeAndStatus($numberyears);
107 if (is_array($sumMembers) && !empty($sumMembers)) {
108 $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'];
112 foreach (array(
'members_draft',
'members_pending',
'members_uptodate',
'members_expired',
'members_excluded',
'members_resiliated') as $val) {
113 if (empty($sumMembers[
'total'][$val])) {
114 $sumMembers[
'total'][$val] = 0;
118 $dataseries = array();
119 $dataseries[] = array($langs->transnoentitiesnoconv(
"MembersStatusToValid"), $sumMembers[
'total'][
'members_draft']);
120 $dataseries[] = array($langs->transnoentitiesnoconv(
"WaitingSubscription"), $sumMembers[
'total'][
'members_pending']);
121 $dataseries[] = array($langs->transnoentitiesnoconv(
"UpToDate"), $sumMembers[
'total'][
'members_uptodate']);
122 $dataseries[] = array($langs->transnoentitiesnoconv(
"OutOfDate"), $sumMembers[
'total'][
'members_expired']);
123 $dataseries[] = array($langs->transnoentitiesnoconv(
"MembersStatusExcluded"), $sumMembers[
'total'][
'members_excluded']);
124 $dataseries[] = array($langs->transnoentitiesnoconv(
"MembersStatusResiliated"), $sumMembers[
'total'][
'members_resiliated']);
126 include DOL_DOCUMENT_ROOT.
'/theme/'.$conf->theme.
'/theme_vars.inc.php';
128 include_once DOL_DOCUMENT_ROOT.
'/core/class/dolgraph.class.php';
130 $dolgraph->SetData($dataseries);
131 $dolgraph->SetDataColor(array(
'-'.$badgeStatus0, $badgeStatus1, $badgeStatus4, $badgeStatus8,
'-'.$badgeStatus8, $badgeStatus6));
132 $dolgraph->setShowLegend(2);
133 $dolgraph->setShowPercent(1);
134 $dolgraph->SetType(array(
'pie'));
135 $dolgraph->setHeight(
'200');
136 $dolgraph->draw(
'idgraphstatus');
137 $boxgraph .= $dolgraph->show($total ? 0 : 1);
139 $boxgraph .=
'</td></tr>';
140 $boxgraph .=
'<tr class="liste_total"><td>'.$langs->trans(
"Total").
'</td><td class="right">';
142 $boxgraph .=
'</td></tr>';
143 $boxgraph .=
'</table>';
144 $boxgraph .=
'</div>';
149print
'<div class="clearboth"></div>';
150print
'<div class="fichecenter fichecenterbis">';
152print
'<div class="twocolumns">';
154print
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
158print $resultboxes[
'boxlista'];
162print
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
164print $resultboxes[
'boxlistb'];
171$parameters = array(
'user' => $user);
172$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($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
getDolGlobalInt($key, $default=0)
Return a 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.