30require
'../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/member.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
38$langs->loadLangs(array(
'companies',
'members'));
44$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
45$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
46$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
47$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
48if (empty($page) || $page == -1) {
51$offset = $limit * $page;
55 $sortfield =
'a.datep,a.id';
61if (
GETPOST(
'actioncode',
'array')) {
62 $actioncode =
GETPOST(
'actioncode',
'array', 3);
63 if (!count($actioncode)) {
69$search_rowid =
GETPOST(
'search_rowid');
70$search_agenda_label =
GETPOST(
'search_agenda_label');
76$hookmanager->initHooks(array(
'memberagenda',
'globalcard'));
83$result = $object->fetch($id);
85 $object->fetch_thirdparty();
88 $result = $adht->fetch($object->typeid);
96$parameters = array(
'id'=>$id,
'objcanvas'=>$objcanvas);
97$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
102if (empty($reshook)) {
104 if (
GETPOST(
'cancel',
'alpha') && !empty($backtopage)) {
105 header(
"Location: ".$backtopage);
110 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
113 $search_agenda_label =
'';
123$contactstatic =
new Contact($db);
125$form =
new Form($db);
128if ($object->id > 0) {
129 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
130 require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
132 $langs->load(
"companies");
134 $title = $langs->trans(
"Member").
" - ".$langs->trans(
"Agenda");
136 $help_url =
"EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder";
140 if (isModEnabled(
'notification')) {
141 $langs->load(
"mails");
147 $linkback =
'<a href="'.DOL_URL_ROOT.
'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
149 $morehtmlref =
'<a href="'.DOL_URL_ROOT.
'/adherents/vcard.php?id='.$object->id.
'" class="refid">';
150 $morehtmlref .=
img_picto($langs->trans(
"Download").
' '.$langs->trans(
"VCard"),
'vcard.png',
'class="valignmiddle marginleftonly paddingrightonly"');
151 $morehtmlref .=
'</a>';
153 dol_banner_tab($object,
'rowid', $linkback, 1,
'rowid',
'ref', $morehtmlref);
155 print
'<div class="fichecenter">';
157 print
'<div class="underbanner clearboth"></div>';
172 if (isModEnabled(
'agenda')) {
173 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'AddAction'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/comm/action/card.php?action=create&backtopage='.urlencode($_SERVER[
'PHP_SELF']).($object->id > 0 ?
'?id='.$object->id :
'').
'&origin=member&originid='.$id);
176 if (isModEnabled(
'agenda') && ($user->hasRight(
'agenda',
'myactions',
'read') || $user->hasRight(
'agenda',
'allactions',
'read'))) {
180 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
181 $param .=
'&contextpage='.$contextpage;
183 if ($limit > 0 && $limit != $conf->liste_limit) {
184 $param .=
'&limit='.$limit;
187 print_barre_liste($langs->trans(
"ActionsOnMember"), 0, $_SERVER[
"PHP_SELF"],
'', $sortfield, $sortorder,
'', 0, -1,
'',
'', $newcardbutton,
'', 0, 1, 1);
191 $filters[
'search_agenda_label'] = $search_agenda_label;
192 $filters[
'search_rowid'] = $search_rowid;
195 show_actions_done($conf, $langs, $db, $object,
null, 0, $actioncode,
'', $filters, $sortfield, $sortorder);
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 members type.
show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=0, $actioncode='', $donetodo='done', $filters=array(), $sortfield='a.datep, a.id', $sortorder='DESC', $module='')
Show html area with actions (done or not, ignore the name of function).
dol_print_object_info($object, $usetable=0)
Show informations on an object TODO Move this into html.formother.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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.
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
member_prepare_head(Adherent $object)
Return array head with list of tabs to view object informations.
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.