29 require
'../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/member.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
34 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
37 $langs->loadLangs(array(
"companies",
"members"));
41 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
42 $sortfield =
GETPOST(
"sortfield",
'alpha');
43 $sortorder =
GETPOST(
"sortorder",
'alpha');
45 if (empty($page) || $page == -1) { $page = 0; }
46 $offset = $limit * $page;
47 $pageprev = $page - 1;
48 $pagenext = $page + 1;
49 if (!$sortfield) $sortfield =
'a.datep,a.id';
50 if (!$sortorder) $sortorder =
'DESC';
52 if (
GETPOST(
'actioncode',
'array')) {
53 $actioncode =
GETPOST(
'actioncode',
'array', 3);
54 if (!count($actioncode)) $actioncode =
'0';
56 $actioncode =
GETPOST(
"actioncode",
"alpha", 3) ?
GETPOST(
"actioncode",
"alpha", 3) : (
GETPOST(
"actioncode") ==
'0' ?
'0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ?
'' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
58 $search_agenda_label =
GETPOST(
'search_agenda_label');
64 $result = $object->fetch($id);
66 $object->fetch_thirdparty();
69 $result = $adht->fetch($object->typeid);
77 $parameters = array(
'id'=>$id,
'objcanvas'=>$objcanvas);
78 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
79 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
81 if (empty($reshook)) {
83 if (
GETPOST(
'cancel',
'alpha') && !empty($backtopage)) {
84 header(
"Location: ".$backtopage);
89 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
91 $search_agenda_label =
'';
101 $contactstatic =
new Contact($db);
103 $form =
new Form($db);
108 if ($object->id > 0) {
109 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
110 require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
112 $langs->load(
"companies");
114 $title = $langs->trans(
"Member").
" - ".$langs->trans(
"Agenda");
115 $helpurl =
"EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros";
118 if (!empty($conf->notification->enabled)) $langs->load(
"mails");
123 $linkback =
'<a href="'.DOL_URL_ROOT.
'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
127 print '<div class="fichecenter">';
129 print '<div class="underbanner clearboth"></div>';
144 if (!empty($conf->agenda->enabled)) {
145 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'AddAction'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/comm/action/card.php?action=create&backtopage=1&origin=member&originid='.$id);
148 if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
152 if (!empty($contextpage) && $contextpage !=
$_SERVER[
"PHP_SELF"]) $param .=
'&contextpage='.$contextpage;
153 if ($limit > 0 && $limit != $conf->liste_limit) $param .=
'&limit='.$limit;
155 print_barre_liste($langs->trans(
"ActionsOnMember"), 0,
$_SERVER[
"PHP_SELF"],
'', $sortfield, $sortorder,
'', 0, -1,
'',
'', $newcardbutton,
'', 0, 1, 1);
159 $filters[
'search_agenda_label'] = $search_agenda_label;
162 show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode,
'', $filters, $sortfield, $sortorder);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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_print_object_info($object, $usetable=0)
Show informations on an object TODO Move this into html.formother.
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).
member_prepare_head(Adherent $object)
Return array head with list of tabs to view object informations.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
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.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
Class to manage members of a foundation.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
Class to manage members type.
print $_SERVER["PHP_SELF"]
Edit parameters.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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.