33require
'../main.inc.php';
34require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/adherents/class/subscription.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
41$langs->loadLangs(array(
"companies",
"members"));
47$hookmanager->initHooks(array(
'membersindex'));
61 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
63 $boxorder =
GETPOST(
'boxorder',
'aZ09');
64 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
81$title = $langs->trans(
"Members");
82$help_url =
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
84llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-member page-index');
90print
load_fiche_titre($langs->trans(
"MembersArea"), $resultboxes[
'selectboxlist'],
'members');
97if ($conf->use_javascript_ajax) {
99 $numberyears =
getDolGlobalInt(
"MAIN_NB_OF_YEAR_IN_MEMBERSHIP_WIDGET_GRAPH");
101 $boxgraph .=
'<div class="div-table-responsive-no-min">';
102 $boxgraph .=
'<table class="noborder nohover centpercent">';
103 $boxgraph .=
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"Statistics").($numberyears ?
' ('.($year - $numberyears).
' - '.$year.
')' :
'').
'</th></tr>';
104 $boxgraph .=
'<tr><td class="center" colspan="2">';
106 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherentstats.class.php';
110 $sumMembers = $stats->countMembersByTypeAndStatus($numberyears);
111 if (is_array($sumMembers) && !empty($sumMembers)) {
112 $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'];
116 foreach (array(
'members_draft',
'members_pending',
'members_uptodate',
'members_expired',
'members_excluded',
'members_resiliated') as $val) {
117 if (empty($sumMembers[
'total'][$val])) {
118 $sumMembers[
'total'][$val] = 0;
122 $dataseries = array();
123 $dataseries[] = array($langs->transnoentitiesnoconv(
"MembersStatusToValid"), $sumMembers[
'total'][
'members_draft']);
124 $dataseries[] = array($langs->transnoentitiesnoconv(
"WaitingSubscription"), $sumMembers[
'total'][
'members_pending']);
125 $dataseries[] = array($langs->transnoentitiesnoconv(
"UpToDate"), $sumMembers[
'total'][
'members_uptodate']);
126 $dataseries[] = array($langs->transnoentitiesnoconv(
"OutOfDate"), $sumMembers[
'total'][
'members_expired']);
127 $dataseries[] = array($langs->transnoentitiesnoconv(
"MembersStatusExcluded"), $sumMembers[
'total'][
'members_excluded']);
128 $dataseries[] = array($langs->transnoentitiesnoconv(
"MembersStatusResiliated"), $sumMembers[
'total'][
'members_resiliated']);
130 include DOL_DOCUMENT_ROOT.
'/theme/'.$conf->theme.
'/theme_vars.inc.php';
132 include_once DOL_DOCUMENT_ROOT.
'/core/class/dolgraph.class.php';
134 $dolgraph->SetData($dataseries);
135 $dolgraph->SetDataColor(array(
'-'.$badgeStatus0, $badgeStatus1, $badgeStatus4, $badgeStatus8,
'-'.$badgeStatus8, $badgeStatus6));
136 $dolgraph->setShowLegend(2);
137 $dolgraph->setShowPercent(1);
138 $dolgraph->SetType(array(
'pie'));
139 $dolgraph->setHeight(
'200');
140 $dolgraph->draw(
'idgraphstatus');
141 $boxgraph .= $dolgraph->show($total ? 0 : 1);
143 $boxgraph .=
'</td></tr>';
144 $boxgraph .=
'<tr class="liste_total"><td>'.$langs->trans(
"Total").
'</td><td class="right">';
146 $boxgraph .=
'</td></tr>';
147 $boxgraph .=
'</table>';
148 $boxgraph .=
'</div>';
153print
'<div class="clearboth"></div>';
154print
'<div class="fichecenter fichecenterbis">';
156print
'<div class="twocolumns">';
158print
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
162print $resultboxes[
'boxlista'];
166print
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
168print $resultboxes[
'boxlistb'];
175$parameters = array(
'user' => $user);
176$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($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.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
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.