Go to the documentation of this file.
33 require
'../../main.inc.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
35 require_once DOL_DOCUMENT_ROOT.
'/core/lib/member.lib.php';
38 $langs->loadLangs(array(
"admin",
"members"));
45 $oldtypetonewone = array(
'texte'=>
'text',
'chaine'=>
'string');
47 $action =
GETPOST(
'action',
'aZ09');
51 $helptext =
'*'.$langs->trans(
"FollowingConstantsWillBeSubstituted").
'<br>';
52 $helptext .=
'__DOL_MAIN_URL_ROOT__, __ID__, __FIRSTNAME__, __LASTNAME__, __FULLNAME__, __LOGIN__, __PASSWORD__, ';
53 $helptext .=
'__COMPANY__, __ADDRESS__, __ZIP__, __TOWN__, __COUNTRY__, __EMAIL__, __BIRTH__, __PHOTO__, __TYPE__, ';
58 'MEMBER_REMINDER_EMAIL'=>array(
'type'=>
'yesno',
'label'=>$langs->trans(
'MEMBER_REMINDER_EMAIL', $langs->transnoentities(
"Module2300Name"))),
59 'ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION' =>array(
'type'=>
'emailtemplate:member',
'label'=>
''),
60 'ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER' =>array(
'type'=>
'emailtemplate:member',
'label'=>
''),
61 'ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION' =>array(
'type'=>
'emailtemplate:member',
'label'=>
''),
62 'ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION' =>array(
'type'=>
'emailtemplate:member',
'label'=>
''),
63 'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>array(
'type'=>
'emailtemplate:member',
'label'=>
''),
64 'ADHERENT_EMAIL_TEMPLATE_EXCLUSION' =>array(
'type'=>
'emailtemplate:member',
'label'=>
''),
65 'ADHERENT_MAIL_FROM' =>array(
'type'=>
'string',
'label'=>
''),
66 'ADHERENT_CC_MAIL_FROM' =>array(
'type'=>
'string',
'label'=>
''),
67 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT' =>array(
'type'=>
'string',
'label'=>
''),
68 'ADHERENT_AUTOREGISTER_NOTIF_MAIL' =>array(
'type'=>
'html',
'tooltip'=>$helptext,
'label'=>
'')
78 if ($action ==
'updateall') {
82 foreach ($constantes as $constname => $value) {
83 $constvalue = (
GETPOSTISSET(
'constvalue_'.$constname) ?
GETPOST(
'constvalue_'.$constname,
'alphanohtml') :
GETPOST(
'constvalue'));
85 $constnote = (
GETPOSTISSET(
'constnote_'.$constname) ?
GETPOST(
'constnote_'.$constname,
'restricthtml') :
GETPOST(
'constnote'));
87 $typetouse = empty($oldtypetonewone[$consttype]) ? $consttype : $oldtypetonewone[$consttype];
88 $constvalue = preg_replace(
'/:member$/',
'', $constvalue);
90 $res =
dolibarr_set_const($db, $constname, $constvalue, $consttype, 0, $constnote, $conf->entity);
107 if ($action ==
'update' || $action ==
'add') {
108 $constlineid =
GETPOST(
'rowid',
'int');
109 $constname =
GETPOST(
'constname',
'alpha');
111 $constvalue = (
GETPOSTISSET(
'constvalue_'.$constname) ?
GETPOST(
'constvalue_'.$constname,
'alphanohtml') :
GETPOST(
'constvalue'));
112 $consttype = (
GETPOSTISSET(
'consttype_'.$constname) ?
GETPOST(
'consttype_'.$constname,
'alphanohtml') :
GETPOST(
'consttype'));
113 $constnote = (
GETPOSTISSET(
'constnote_'.$constname) ?
GETPOST(
'constnote_'.$constname,
'restricthtml') :
GETPOST(
'constnote'));
115 $typetouse = empty($oldtypetonewone[$consttype]) ? $consttype : $oldtypetonewone[$consttype];
116 $constvalue = preg_replace(
'/:member$/',
'', $constvalue);
118 $res =
dolibarr_set_const($db, $constname, $constvalue, $typetouse, 0, $constnote, $conf->entity);
138 $help_url =
'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder';
143 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
144 print
load_fiche_titre($langs->trans(
"MembersSetup"), $linkback,
'title_setup');
152 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
153 print
'<input type="hidden" name="token" value="'.newToken().
'">';
154 print
'<input type="hidden" name="action" value="updateall">';
158 print
'<div class="center"><input type="submit" class="button" value="'.$langs->trans(
"Update").
'" name="update"></div>';
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
member_admin_prepare_head()
Return array head with list of tabs to view object informations.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
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.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_get_fiche_end($notab=0)
Return 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.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
form_constantes($tableau, $strictw3c=0, $helptext='', $text='Value')
Show array with constants to edit.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.