* Copyright (C) 2006-2011 Laurent Destailleur * 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/public.php * \ingroup member * \brief File of main public page for member module * \author Laurent Destailleur */ require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/member.lib.php"); $langs->load("members"); $langs->load("admin"); $action=GETPOST('action'); if (! $user->admin) accessforbidden(); /* * Actions */ if ($action == 'update') { $res=dolibarr_set_const($db, "MEMBER_ENABLE_PUBLIC",$_POST["MEMBER_ENABLE_PUBLIC"],'chaine',0,'',$conf->entity); $res=dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT",$_POST["MEMBER_NEWFORM_AMOUNT"],'chaine',0,'',$conf->entity); $res=dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT",$_POST["MEMBER_NEWFORM_EDITAMOUNT"],'chaine',0,'',$conf->entity); $res=dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE",$_POST["MEMBER_NEWFORM_PAYONLINE"],'chaine',0,'',$conf->entity); if (! $res > 0) $error++; if (! $error) { $mesg = "".$langs->trans("SetupSaved").""; } else { $mesg = "".$langs->trans("Error").""; } } /* * 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'.'
'; */ llxFooter(); $db->close(); ?>