* Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file htdocs/adherents/admin/adherent.php * \ingroup member * \brief Page to setup the module Foundation */ require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/member.lib.php"); $langs->load("admin"); $langs->load("members"); if (! $user->admin) accessforbidden(); $type=array('yesno','texte','chaine'); $action = GETPOST("action"); /* * Actions */ // Action mise a jour ou ajout d'une constante if ($action == 'update' || $action == 'add') { $constname=GETPOST("constname"); $constvalue=GETPOST("constvalue"); if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue=''; if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice { if ($constvalue) $constvalue=0; else $constvalue=1; } if (in_array($constname,array('ADHERENT_MAIL_VALID','ADHERENT_MAIL_COTIS','ADHERENT_MAIL_RESIL'))) $constvalue=$_POST["constvalue".$constname]; $consttype=$_POST["consttype"]; $constnote=GETPOST("constnote"); $res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity); if (! $res > 0) $error++; if (! $error) { $mesg = '
'.$langs->trans("SetupSaved").'
'; } else { $mesg = '
'.$langs->trans("Error").'
'; } } // Action activation d'un sous module du module adherent if ($action == 'set') { $result=dolibarr_set_const($db, $_GET["name"],$_GET["value"],'',0,'',$conf->entity); if ($result < 0) { print $db->error(); } } // Action desactivation d'un sous module du module adherent if ($action == 'unset') { $result=dolibarr_del_const($db,$_GET["name"],$conf->entity); if ($result < 0) { print $db->error(); } } /* * View */ $help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'; llxHeader('',$langs->trans("MembersSetup"),$help_url); $linkback=''.$langs->trans("BackToModuleList").''; print_fiche_titre($langs->trans("MembersSetup"),$linkback,'setup'); $head = member_admin_prepare_head($adh); dol_fiche_head($head, 'general', $langs->trans("Member"), 0, 'user'); dol_htmloutput_mesg($mesg); print_fiche_titre($langs->trans("MemberMainOptions"),'',''); print ''; print ''; print ''; print ''; print ''; print "\n"; $var=true; $form = new Form($db); // Login/Pass required for members if ($conf->global->MAIN_FEATURES_LEVEL > 0) { $var=!$var; print ''; print ''; print ''; print ''; print ''; print '\n"; print ''; } // Mail required for members $var=!$var; print ''; print ''; print ''; print ''; print ''; print '\n"; print ''; // Send mail information is on by default $var=!$var; print ''; print ''; print ''; print ''; print ''; print '\n"; print ''; // Insertion cotisations dans compte financier $var=!$var; print ''; print ''; print ''; print ''; print ''; print ''; if ($conf->banque->enabled) { print ''; } else { print ''; } print "\n"; print ''; print '
'.$langs->trans("Description").''.$langs->trans("Value").''.$langs->trans("Action").'
'.$langs->trans("AdherentLoginRequired").''; print $form->selectyesno('constvalue',!$conf->global->ADHERENT_LOGIN_NOT_REQUIRED,1); print ''; print ''; print "
'.$langs->trans("AdherentMailRequired").''; print $form->selectyesno('constvalue',$conf->global->ADHERENT_MAIL_REQUIRED,1); print ''; print ''; print "
'.$langs->trans("MemberSendInformationByMailByDefault").''; print $form->selectyesno('constvalue',$conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL,1); print ''; print ''; print "
'.$langs->trans("AddSubscriptionIntoAccount").''; print $form->selectyesno('constvalue',$conf->global->ADHERENT_BANK_USE,1); print ''; print ''; print ''; print $langs->trans("WarningModuleNotActive",$langs->transnoentities("Module85Name")).' '.img_warning("",""); print '
'; print '
'; /* * Edition info modele document */ $constantes=array( 'ADHERENT_CARD_TYPE', // 'ADHERENT_CARD_BACKGROUND', 'ADHERENT_CARD_HEADER_TEXT', 'ADHERENT_CARD_TEXT', 'ADHERENT_CARD_TEXT_RIGHT', 'ADHERENT_CARD_FOOTER_TEXT' ); print_fiche_titre($langs->trans("MembersCards"),'',''); form_constantes($constantes); print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'
'; print '%DOL_MAIN_URL_ROOT%, %ID%, %PRENOM%, %NOM%, %LOGIN%, %PASSWORD%, '; print '%SOCIETE%, %ADRESSE%, %CP%, %VILLE%, %PAYS%, %EMAIL%, %NAISS%, %PHOTO%, %TYPE%, '; print '%YEAR%, %MONTH%, %DAY%'; //print '%INFOS%'; Deprecated print '
'; print '
'; /* * Edition info modele document */ $constantes=array('ADHERENT_ETIQUETTE_TYPE'); print_fiche_titre($langs->trans("MembersTickets"),'',''); form_constantes($constantes); print '
'; /* * Edition des variables globales non rattache a un theme specifique */ $constantes=array( 'ADHERENT_AUTOREGISTER_MAIL_SUBJECT', 'ADHERENT_AUTOREGISTER_MAIL', 'ADHERENT_MAIL_VALID_SUBJECT', 'ADHERENT_MAIL_VALID', 'ADHERENT_MAIL_COTIS_SUBJECT', 'ADHERENT_MAIL_COTIS', 'ADHERENT_MAIL_RESIL_SUBJECT', 'ADHERENT_MAIL_RESIL', 'ADHERENT_MAIL_FROM', ); print_fiche_titre($langs->trans("Other"),'',''); form_constantes($constantes); print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'
'; print '%DOL_MAIN_URL_ROOT%, %ID%, %PRENOM%, %NOM%, %LOGIN%, %PASSWORD%,'; print '%SOCIETE%, %ADRESSE%, %CP%, %VILLE%, %PAYS%, %EMAIL%, %NAISS%, %PHOTO%, %TYPE%'; //print '%YEAR%, %MONTH%, %DAY%'; // Not supported //print '%INFOS%'; Deprecated print '
'; dol_fiche_end(); llxFooter(); $db->close(); ?>