diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php new file mode 100755 index 00000000000..6fcf9e8293b --- /dev/null +++ b/htdocs/adherents/admin/public.php @@ -0,0 +1,188 @@ + + * Copyright (C) 2006-2010 Laurent Destailleur + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \file htdocs/adherents/admin/public.php + * \ingroup member + * \brief File of main public page for member module + * \author Laurent Destailleur + * \version $Id: public.php,v 1.1 2011/07/03 16:00:19 eldy Exp $ + */ + +require("../../main.inc.php"); +require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); +require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); +require_once(DOL_DOCUMENT_ROOT."/lib/member.lib.php"); + +$action=GETPOST('action'); + + +/* + * Actions + */ + +if ($action == 'update') +{ + $i=0; + $i+=dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC",$_POST["MEMBER_ENABLE_PUBLIC"],'chaine',0,'',$conf->entity); + $i+=dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT",$_POST["MEMBER_NEWFORM_AMOUNT"],'chaine',0,'',$conf->entity); + $i+=dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT",$_POST["MEMBER_NEWFORM_EDITAMOUNT"],'chaine',0,'',$conf->entity); + $i+=dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE",$_POST["MEMBER_NEWFORM_PAYONLINE"],'chaine',0,'',$conf->entity); + if ($i == 4) $mesg=$langs->trans("RecordModifiedSuccessfully"); +} + + + +/* + * View + */ + +$form=new Form($db); + +$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, 'public', $langs->trans("Member"), 0, 'user'); + +dol_htmloutput_mesg($mesg); + +if ($conf->use_javascript_ajax) +{ + print "\n".''."\n"; +} + + +print $langs->trans("BlankSubscriptionFormDesc").'

'; + +print '
'; +print ''; + +print ''; + +print ''; +print ''; +print ''; +print "\n"; +$var=true; + +// Allow public form +$var=! $var; +print ''; +print '\n"; +print ''; + +// Type +/*$var=! $var; +print ''; +print '\n"; */ + +// Amount +$var=! $var; +print ''; +print '\n"; + +// Can edit +$var=! $var; +print ''; +print '\n"; + +if ($conf->paybox->enabled || $conf->paypal->enabled) +{ + // Jump to an online payment page + $var=! $var; + print '\n"; +} + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; +print $langs->trans("EnablePublicSubscriptionForm"); +print ''; +print $form->selectyesno("MEMBER_ENABLE_PUBLIC",$conf->global->MEMBER_ENABLE_PUBLIC,1); +print "
'; +print $langs->trans("EnablePublicSubscriptionForm"); +print ''; +print $form->selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1); +print "
'; +print $langs->trans("DefaultAmount"); +print ''; +print '';; +print "
'; +print $langs->trans("CanEditAmount"); +print ''; +print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT",$conf->global->MEMBER_NEWFORM_EDITAMOUNT,1); +print "
'; + print $langs->trans("MEMBER_NEWFORM_PAYONLINE"); + print ''; + $listofval=array(); + if ($conf->paybox->enabled) $listofval['paybox']='Paybox'; + if ($conf->paypal->enabled) $listofval['paypal']='PayPal'; + print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,$conf->global->MEMBER_NEWFORM_PAYONLINE,1); + print "
'; + +print '
'; +print ''; +print '
'; + +print ''; + +dol_fiche_end(); + + +print '
'; +//print $langs->trans('FollowingLinksArePublic').'
'; +print img_picto('','object_globe.png').' '.$langs->trans('BlankSubscriptionForm').':
'; +print ''.DOL_MAIN_URL_ROOT.'/public/members/new.php'.''; + +/* +print ''; +print ''; +print ''; +print ''; +print ''; +print '
'.$langs->trans("Description").''.$langs->trans("URL").'
'.$langs->trans("BlankSubscriptionForm").''..'
'.$langs->trans("PublicMemberList").''.img_picto('','object_globe.png').' '.''.DOL_MAIN_URL_ROOT.'/public/members/public_list.php'.'
'.$langs->trans("PublicMemberCard").''.img_picto('','object_globe.png').' '.DOL_MAIN_URL_ROOT.'/public/members/public_card.php?id=xxx'.'
'; +*/ + +$db->close(); + +llxFooter('$Date: 2011/07/03 16:00:19 $ - $Revision: 1.1 $'); +?> diff --git a/htdocs/adherents/public.php b/htdocs/adherents/public.php deleted file mode 100644 index 46d18c37c23..00000000000 --- a/htdocs/adherents/public.php +++ /dev/null @@ -1,62 +0,0 @@ - - * Copyright (C) 2006-2010 Laurent Destailleur - * - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * \file htdocs/adherents/public.php - * \ingroup member - * \brief File of main public page for member module - * \author Laurent Destailleur - * \version $Id$ - */ - -require("../main.inc.php"); - - - -/* - * View - */ - -llxHeader(); - -print_fiche_titre($langs->trans("PublicMembersArea")); - - -print ''; - -print '
'; - -print $langs->trans('FollowingLinksArePublic').'
'; -print '
'; - -print ''; -print ''; -print ''; -print ''; -print ''; -print '
'.$langs->trans("Description").''.$langs->trans("URL").'
'.$langs->trans("BlankSubscriptionForm").''.img_picto('','object_globe.png').' '.''.DOL_MAIN_URL_ROOT.'/public/members/new.php'.'
'.$langs->trans("PublicMemberList").''.img_picto('','object_globe.png').' '.''.DOL_MAIN_URL_ROOT.'/public/members/public_list.php'.'
'.$langs->trans("PublicMemberCard").''.img_picto('','object_globe.png').' '.DOL_MAIN_URL_ROOT.'/public/members/public_card.php?id=xxx'.'
'; - - -print '
'; - - -$db->close(); - -llxFooter('$Date$ - $Revision$'); -?> diff --git a/htdocs/includes/menus/init_menu_auguria.sql b/htdocs/includes/menus/init_menu_auguria.sql index dec3ccbf2b7..f9b90c48d5f 100644 --- a/htdocs/includes/menus/init_menu_auguria.sql +++ b/htdocs/includes/menus/init_menu_auguria.sql @@ -1,6 +1,6 @@ -- --- $Id: init_menu_auguria.sql,v 1.118 2011/06/29 17:55:34 eldy Exp $ --- $Revision: 1.118 $ +-- $Id: init_menu_auguria.sql,v 1.119 2011/07/03 16:00:20 eldy Exp $ +-- $Revision: 1.119 $ -- -- Menu base entries -- This file is loaded when a menu handler base is activated (auguria, etc..) @@ -263,7 +263,6 @@ insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled && $conf->export->enabled', __HANDLER__, 'left', 4501__+MAX_llx_menu__, 'members', '', 4500__+MAX_llx_menu__, '/exports/index.php?leftmenu=export', 'Datas', 1, 'members', '$user->rights->adherent->export', '', 2, 0, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4502__+MAX_llx_menu__, 'members', '', 4500__+MAX_llx_menu__, '/adherents/htpasswd.php?leftmenu=export', 'Filehtpasswd', 1, 'members', '$user->rights->adherent->export', '', 2, 1, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4503__+MAX_llx_menu__, 'members', '', 4500__+MAX_llx_menu__, '/adherents/cartes/carte.php?leftmenu=export', 'MembersCards', 1, 'members', '$user->rights->adherent->export', '', 2, 2, __ENTITY__); -insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'members', '', 13__+MAX_llx_menu__, '/adherents/public.php?leftmenu=member_public', 'MemberPublicLinks', 0, 'members', '$user->rights->adherent->export', '', 2, 4, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4700__+MAX_llx_menu__, 'members', '', 13__+MAX_llx_menu__, '/adherents/type.php?leftmenu=setup&mainmenu=members', 'MembersType', 0, 'members', '$user->rights->adherent->configurer', '', 2, 5, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4701__+MAX_llx_menu__, 'members', '', 4700__+MAX_llx_menu__, '/adherents/type.php?leftmenu=setup&mainmenu=members&action=create', 'New', 1, 'members', '$user->rights->adherent->configurer', '', 2, 0, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4702__+MAX_llx_menu__, 'members', '', 4700__+MAX_llx_menu__, '/adherents/type.php?leftmenu=setup&mainmenu=members', 'List', 1, 'members', '$user->rights->adherent->configurer', '', 2, 1, __ENTITY__); diff --git a/htdocs/includes/menus/init_menu_smartphone.sql b/htdocs/includes/menus/init_menu_smartphone.sql index 8cf20414457..030c471d50b 100755 --- a/htdocs/includes/menus/init_menu_smartphone.sql +++ b/htdocs/includes/menus/init_menu_smartphone.sql @@ -1,6 +1,6 @@ -- --- $Id$ --- $Revision$ +-- $Id: init_menu_smartphone.sql,v 1.7 2011/07/03 16:00:20 eldy Exp $ +-- $Revision: 1.7 $ -- -- Menu base entries -- This file is loaded when a menu handler base is activated (auguria, etc..) @@ -281,7 +281,6 @@ insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled && $conf->export->enabled', __HANDLER__, 'left', 4501__+MAX_llx_menu__, 'members', '', 4500__+MAX_llx_menu__, '/exports/index.php?leftmenu=export', 'Datas', 1, 'members', '$user->rights->adherent->export', '', 2, 0, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4502__+MAX_llx_menu__, 'members', '', 4500__+MAX_llx_menu__, '/adherents/htpasswd.php?leftmenu=export', 'Filehtpasswd', 1, 'members', '$user->rights->adherent->export', '', 2, 1, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4503__+MAX_llx_menu__, 'members', '', 4500__+MAX_llx_menu__, '/adherents/cartes/carte.php?leftmenu=export', 'MembersCards', 1, 'members', '$user->rights->adherent->export', '', 2, 2, __ENTITY__); -insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'members', '', 13__+MAX_llx_menu__, '/adherents/public.php?leftmenu=member_public', 'MemberPublicLinks', 0, 'members', '$user->rights->adherent->export', '', 2, 4, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4700__+MAX_llx_menu__, 'members', '', 13__+MAX_llx_menu__, '/adherents/index.php?leftmenu=setup&mainmenu=members', 'Setup', 0, 'members', '$user->rights->adherent->configurer', '', 2, 5, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4701__+MAX_llx_menu__, 'members', '', 4700__+MAX_llx_menu__, '/adherents/type.php?leftmenu=setup', 'MembersTypes', 1, 'members', '$user->rights->adherent->configurer', '', 2, 0, __ENTITY__); insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->adherent->enabled', __HANDLER__, 'left', 4702__+MAX_llx_menu__, 'members', '', 4700__+MAX_llx_menu__, '/adherents/options.php?leftmenu=setup', 'MembersAttributes', 1, 'members', '$user->rights->adherent->configurer', '', 2, 1, __ENTITY__); diff --git a/htdocs/includes/menus/standard/eldy.lib.php b/htdocs/includes/menus/standard/eldy.lib.php index 79a43e43887..3cf07c4dc17 100644 --- a/htdocs/includes/menus/standard/eldy.lib.php +++ b/htdocs/includes/menus/standard/eldy.lib.php @@ -21,7 +21,7 @@ /** * \file htdocs/includes/menus/standard/eldy.lib.php * \brief Library for file eldy menus - * \version $Id: eldy.lib.php,v 1.53 2011/06/29 22:41:49 eldy Exp $ + * \version $Id: eldy.lib.php,v 1.54 2011/07/03 16:00:18 eldy Exp $ */ @@ -1301,7 +1301,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) if ($leftmenu=="export") $newmenu->add("/adherents/htpasswd.php?leftmenu=export",$langs->trans("Filehtpasswd"),1,$user->rights->adherent->export); if ($leftmenu=="export") $newmenu->add("/adherents/cartes/carte.php?leftmenu=export",$langs->trans("MembersCards"),1,$user->rights->adherent->export); - $newmenu->add("/adherents/public.php?leftmenu=member_public",$langs->trans("MemberPublicLinks")); // Type $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members",$langs->trans("MembersTypes"),0,$user->rights->adherent->configurer); $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members&action=create",$langs->trans("New"),1,$user->rights->adherent->configurer); diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index ada92b09834..ee492c181b6 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -76,7 +76,7 @@ EditMember=Edit member SubscriptionEndDate=Subscription's end date MembersTypeSetup=Members type setup NewSubscription=New subscription -NewSubscriptionDesc=This form allows you to record your subscription as a new member of the foundation. If you want to renew your subscription being already a member, please contact foundation board instead. +NewSubscriptionDesc=This form allows you to record your subscription as a new member of the foundation. If you want to renew your subscription (if already a member), please contact foundation board instead. Subscription=Subscription Subscriptions=Subscriptions SubscriptionLate=Late @@ -109,7 +109,9 @@ ValidateMember=Validate a member ConfirmValidateMember=Are you sure you want to validate this member ? FollowingLinksArePublic=The following links are open pages not protected by any Dolibarr permission. They are not formated pages, provided as example to show how to list members database. PublicMemberList=Public member list -BlankSubscriptionForm=Subscription form +BlankSubscriptionForm=Public auto-subscription form +BlankSubscriptionFormDesc=Dolibarr can provide you a public URL to allow external visitors to ask to subscribe to the foundation. If an online payment module is enabled, a payment form will also be automatically provided. +EnablePublicSubscriptionForm=Enable the public auto-subscription form MemberPublicLinks=Public links/pages ExportDataset_member_1=Members and subscriptions ImportDataset_member_1=Members @@ -176,11 +178,14 @@ MembersStatisticsDesc=Choose statistics you want to read... MenuMembersStats=Statistics LastMemberDate=Last member date Nature=Nature -Public=Public +Public=Information are public (no=private) Exports=Exports NewMemberbyWeb=New member added. Awaiting approval NewMemberForm=New member form SubscriptionsStatistics=Statistics on subscriptions NbOfSubscriptions=Number of subscriptions AmountOfSubscriptions=Amount of subscriptions -TurnoverOrBudget=Turnover (for a company) or Budget (for a foundation) \ No newline at end of file +TurnoverOrBudget=Turnover (for a company) or Budget (for a foundation) +DefaultAmount=Default amount of subscription +CanEditAmount=Visitor can choose/edit amount of its subscription +MEMBER_NEWFORM_PAYONLINE=Jump on integrated online payment page \ No newline at end of file diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index 82a83d39d36..d4a3030cd43 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -110,7 +110,9 @@ ValidateMember=Valider un adhérent ConfirmValidateMember=Êtes-vous sûr de vouloir valider cet adhérent ? FollowingLinksArePublic=Les liens suivants sont des pages accessibles à tous et non protégées par aucune habilitation Dolibarr. Ces pages n'ont aucun formatage et sont fournies à titre d'exemple pour les associations qui veulent des scripts publics de consultation. PublicMemberList=Liste des membres publics -BlankSubscriptionForm=Formulaire inscription +BlankSubscriptionForm=Formulaire publique d'auto-inscription +BlankSubscriptionFormDesc=Dolibarr peut offrir une URL de page publique pour les visiteurs externes permettant de postuler à une adhésion. Si un un module de paiement en ligne est également actif, un formulaire de paiement sera également automatiquement proposé. +EnablePublicSubscriptionForm=Activer le formulaire publique d'autoinscription MemberPublicLinks=Liens/pages publiques ExportDataset_member_1=Adhérents et adhésions ImportDataset_member_1=Adhérents @@ -177,11 +179,14 @@ MembersStatisticsDesc=Choisissez les statistiques que vous désirez consulter... MenuMembersStats=Statistiques LastMemberDate=Date dernier adhérent Nature=Nature -Public=Public +Public=Informations publiques (no=privées) Exports=Exports NewMemberbyWeb=Nouvel Adherent ajoute. En attente de validation NewMemberForm=Nouvel Adherent form SubscriptionsStatistics=Statistiques sur les cotisations NbOfSubscriptions=Nombre de cotisations AmountOfSubscriptions=Montant de cotisations -TurnoverOrBudget=Chiffre affaire (pour société) ou Budget (asso ou collectivité) \ No newline at end of file +TurnoverOrBudget=Chiffre affaire (pour société) ou Budget (asso ou collectivité) +DefaultAmount=Montant par défaut de la cotisation +CanEditAmount=Le visiteur peut modifier/choisir le montant de sa cotisation +MEMBER_NEWFORM_PAYONLINE=Débrancher sur la page intégrée de paiement en ligne \ No newline at end of file diff --git a/htdocs/lib/member.lib.php b/htdocs/lib/member.lib.php index 96444256918..74257f9e4e0 100644 --- a/htdocs/lib/member.lib.php +++ b/htdocs/lib/member.lib.php @@ -20,7 +20,7 @@ /** * \file htdocs/lib/member.lib.php * \brief Ensemble de fonctions de base pour les adherents - * \version $Id$ + * \version $Id: member.lib.php,v 1.24 2011/07/03 16:00:19 eldy Exp $ * * Ensemble de fonctions de base de dolibarr sous forme d'include */ @@ -116,6 +116,11 @@ function member_admin_prepare_head($object) $head[$h][2] = 'attributes'; $h++; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/public.php'; + $head[$h][1] = $langs->trans("BlankSubscriptionForm"); + $head[$h][2] = 'public'; + $h++; + // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 51deb9696f1..d2099e5b124 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -22,7 +22,7 @@ * \file htdocs/public/members/new.php * \ingroup member * \brief Example of form to add a new member - * \version $Id: new.php,v 1.29 2011/06/26 21:51:34 eldy Exp $ + * \version $Id: new.php,v 1.30 2011/07/03 16:00:19 eldy Exp $ * * Note that you can add following constant to change behaviour of page * MEMBER_NEWFORM_AMOUNT Default amount for autosubscribe form @@ -45,8 +45,12 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/extrafields.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formcompany.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); -// Security check -if (empty($conf->adherent->enabled)) accessforbidden('',1,1,1); +// Init vars +$errmsg=''; +$num=0; +$error=0; +$backtopage=GETPOST('backtopage'); +$action=GETPOST('action'); // Load translation files $langs->load("main"); @@ -55,12 +59,14 @@ $langs->load("companies"); $langs->load("install"); $langs->load("other"); -// Init vars -$errmsg=''; -$num=0; -$error=0; -$backtopage=GETPOST('backtopage'); -$action=GETPOST('action'); +// Security check +if (empty($conf->adherent->enabled)) accessforbidden('',1,1,1); + +if (empty($conf->global->MEMBER_ENABLE_PUBLIC)) +{ + print $langs->trans("Auto subscription form for public visitors has no be enabled"); + exit; +} // Function for page HTML header @@ -263,7 +269,7 @@ if ($action == 'added') print $langs->trans("NewMemberbyWeb"); print ''; - llxFooterVierge('$Date: 2011/06/26 21:51:34 $ - $Revision: 1.29 $'); + llxFooterVierge('$Date: 2011/07/03 16:00:19 $ - $Revision: 1.30 $'); exit; } @@ -290,7 +296,7 @@ if (! empty($conf->global->MEMBER_NEWFORM_TEXT)) print $langs->trans($conf->glob dol_htmloutput_errors($errmsg); print '
'.$langs->trans("FieldsWithAreMandatory",'*').'
'; -print $langs->trans("FieldsWithIsForPublic",'**').'
'; +//print $langs->trans("FieldsWithIsForPublic",'**').'
'; print '