* Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * * 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/admin/user.php * \ingroup core * \brief Page to setup user module * \version $Id$ */ require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); $langs->load("admin"); $langs->load("members"); $langs->load("users"); if (!$user->admin) accessforbidden(); $typeconst=array('yesno','texte','chaine'); // Action mise a jour ou ajout d'une constante if ($_POST["action"] == 'update' || $_POST["action"] == 'add') { $result=dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],0,isset($_POST["constnote"])?$_POST["constnote"]:'',$conf->entity); if ($result < 0) { print $db->error(); } } // Action activation d'un sous module du module adherent if ($_GET["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 ($_GET["action"] == 'unset') { $result=dolibarr_del_const($db,$_GET["name"],$conf->entity); if ($result < 0) { print $db->error(); } } /* * View */ llxHeader(); $var=True; $linkback=''.$langs->trans("BackToModuleList").''; print_fiche_titre($langs->trans("UsersSetup"),$linkback,'setup'); print "
"; print_fiche_titre($langs->trans("MemberMainOptions"),'',''); print ''; print ''; print ''; print ''; print ''; print "\n"; $var=true; $form = new Form($db); // Mail required for members $var=!$var; print ''; print ''; print ''; print ''; print ''; print "\n"; print ''; print '
'.$langs->trans("Description").''.$langs->trans("Value").''.$langs->trans("Action").'
".$langs->trans("UserMailRequired").''; print $form->selectyesno('constvalue',$conf->global->USER_MAIL_REQUIRED,1); print ''; print ''; print "
'; print '
'; $db->close(); print '
'; llxFooter('$Date$ - $Revision$'); ?>