34require
'../main.inc.php';
35require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/adherents/class/subscription.class.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
50$langs->loadLangs(array(
"companies",
"members"));
56$hookmanager->initHooks(array(
'membersindex'));
70 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
72 $boxorder =
GETPOST(
'boxorder',
'aZ09');
73 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
90$title = $langs->trans(
"Members");
91$help_url =
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
93llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-member page-index');
99print
load_fiche_titre($langs->trans(
"MembersArea"), $resultboxes[
'selectboxlist'],
'members');
106if (
$conf->use_javascript_ajax) {
108 $numberyears =
getDolGlobalInt(
"MAIN_NB_OF_YEAR_IN_MEMBERSHIP_WIDGET_GRAPH");
110 $boxgraph .=
'<div class="div-table-responsive-no-min">';
111 $boxgraph .=
'<table class="noborder nohover centpercent">';
112 $boxgraph .=
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"Statistics").($numberyears ?
' ('.($year - $numberyears).
' - '.$year.
')' :
'').
'</th></tr>';
113 $boxgraph .=
'<tr><td class="center" colspan="2">';
115 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherentstats.class.php';
119 $sumMembers = $stats->countMembersByTypeAndStatus($numberyears);
120 if (is_array($sumMembers) && !empty($sumMembers)) {
121 $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'];
125 foreach (array(
'members_draft',
'members_pending',
'members_uptodate',
'members_expired',
'members_excluded',
'members_resiliated') as $val) {
126 if (empty($sumMembers[
'total'][$val])) {
127 $sumMembers[
'total'][$val] = 0;
131 $dataseries = array();
132 $dataseries[] = array($langs->transnoentitiesnoconv(
"MembersStatusToValid"), $sumMembers[
'total'][
'members_draft']);
133 $dataseries[] = array($langs->transnoentitiesnoconv(
"WaitingSubscription"), $sumMembers[
'total'][
'members_pending']);
134 $dataseries[] = array($langs->transnoentitiesnoconv(
"UpToDate"), $sumMembers[
'total'][
'members_uptodate']);
135 $dataseries[] = array($langs->transnoentitiesnoconv(
"OutOfDate"), $sumMembers[
'total'][
'members_expired']);
136 $dataseries[] = array($langs->transnoentitiesnoconv(
"MembersStatusExcluded"), $sumMembers[
'total'][
'members_excluded']);
137 $dataseries[] = array($langs->transnoentitiesnoconv(
"MembersStatusResiliated"), $sumMembers[
'total'][
'members_resiliated']);
146 include DOL_DOCUMENT_ROOT.
'/theme/'.
$conf->theme.
'/theme_vars.inc.php';
148 include_once DOL_DOCUMENT_ROOT.
'/core/class/dolgraph.class.php';
150 $dolgraph->SetData($dataseries);
151 $dolgraph->SetDataColor(array(
'-'.$badgeStatus0, $badgeStatus1, $badgeStatus4, $badgeStatus8,
'-'.$badgeStatus8, $badgeStatus6));
152 $dolgraph->setShowLegend(2);
153 $dolgraph->setShowPercent(1);
154 $dolgraph->SetType(array(
'pie'));
155 $dolgraph->setHeight(
'200');
156 $dolgraph->draw(
'idgraphstatus');
157 $boxgraph .= $dolgraph->show($total ? 0 : 1);
159 $boxgraph .=
'</td></tr>';
160 $boxgraph .=
'<tr class="liste_total"><td>'.$langs->trans(
"Total").
'</td><td class="right">';
162 $boxgraph .=
'</td></tr>';
163 $boxgraph .=
'</table>';
164 $boxgraph .=
'</div>';
169print
'<div class="clearboth"></div>';
170print
'<div class="fichecenter fichecenterbis">';
172print
'<div class="twocolumns">';
174print
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
178print $resultboxes[
'boxlista'];
182print
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
184print $resultboxes[
'boxlistb'];
191$parameters = array(
'user' => $user);
192$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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
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.