Go to the documentation of this file.
26 require
'../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/member.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent_type.class.php';
32 $langs->loadLangs(array(
"companies",
"members",
"bills"));
34 $action =
GETPOST(
'action',
'aZ09');
36 $ref =
GETPOST(
'ref',
'alphanohtml');
39 $result = $object->fetch($id);
42 $result = $adht->fetch($object->typeid);
45 $permissionnote = $user->rights->adherent->creer;
48 if ($id > 0 || !empty($ref)) {
50 $result = $object->fetch($id, $ref);
53 $canadduser = ($user->admin || $user->rights->user->user->creer);
55 if ($object->user_id) {
57 $caneditfielduser = ((($user->id == $object->user_id) && $user->rights->user->self->creer)
58 || (($user->id != $object->user_id) && $user->rights->user->user->creer));
59 $caneditpassworduser = ((($user->id == $object->user_id) && $user->rights->user->self->password)
60 || (($user->id != $object->user_id) && $user->rights->user->user->password));
65 $canaddmember = $user->rights->adherent->creer;
68 $caneditfieldmember = $user->rights->adherent->creer;
71 $hookmanager->initHooks(array(
'membernote'));
74 $result =
restrictedArea($user,
'adherent', $object->id,
'',
'',
'socid',
'rowid', 0);
79 $reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
83 if (empty($reshook)) {
84 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
92 $title = $langs->trans(
"Member").
" - ".$langs->trans(
"Note");
94 $help_url =
"EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder";
105 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
106 print
'<input type="hidden" name="token" value="'.newToken().
'">';
108 $linkback =
'<a href="'.DOL_URL_ROOT.
'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
110 $morehtmlref =
'<a href="'.DOL_URL_ROOT.
'/adherents/vcard.php?id='.$object->id.
'" class="refid">';
111 $morehtmlref .=
img_picto($langs->trans(
"Download").
' '.$langs->trans(
"VCard"),
'vcard.png',
'class="valignmiddle marginleftonly paddingrightonly"');
112 $morehtmlref .=
'</a>';
114 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref);
116 print
'<div class="fichecenter">';
118 print
'<div class="underbanner clearboth"></div>';
119 print
'<table class="border centpercent tableforfield">';
122 if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
123 print
'<tr><td class="titlefield">'.$langs->trans(
"Login").
' / '.$langs->trans(
"Id").
'</td><td class="valeur">'.$object->login.
' </td></tr>';
127 print
'<tr><td>'.$langs->trans(
"Type").
'</td><td class="valeur">'.$adht->getNomUrl(1).
"</td></tr>\n";
130 print
'<tr><td class="titlefield">'.$langs->trans(
"MemberNature").
'</td><td class="valeur" >'.$object->getmorphylib().
'</td>';
137 print
'<tr><td>'.$langs->trans(
"Company").
'</td><td class="valeur">'.$object->company.
'</td></tr>';
140 print
'<tr><td>'.$langs->trans(
"UserTitle").
'</td><td class="valeur">'.$object->getCivilityLabel().
' </td>';
148 $cssclass =
'titlefield';
149 $permission = $user->rights->adherent->creer;
150 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
Class to manage members type.
restrictedArea($user, $features, $objectid=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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
member_prepare_head(Adherent $object)
Return array head with list of tabs to view object informations.
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.
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Class to manage members of a foundation.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.