* Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2011 Regis Houssin * * 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/admin/user.php * \ingroup core * \brief Page to setup user module * \version $Id: user.php,v 1.5 2011/07/31 22:23:21 eldy Exp $ */ 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(); /* * Action */ if (preg_match('/set_(.*)/',$action,$reg)) { $code=$reg[1]; if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { dol_print_error($db); } } if (preg_match('/del_(.*)/',$action,$reg)) { $code=$reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { dol_print_error($db); } } /* * View */ llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; print_fiche_titre($langs->trans("UsersSetup"),$linkback,'setup'); print "
"; print_fiche_titre($langs->trans("MemberMainOptions"),'',''); print ''; print ''; print ''; print ''; print ''."\n"; print ''; $var=true; $form = new Form($db); // Mail required for members $var=!$var; print ''; print ''; print ''; print ''; print '
'.$langs->trans("Description").' '.$langs->trans("Value").'
'.$langs->trans("UserMailRequired").' '; if ($conf->use_javascript_ajax) { print ajax_constantonoff('USER_MAIL_REQUIRED'); } else { if($conf->global->USER_MAIL_REQUIRED == 0) { print ''.img_picto($langs->trans("Disabled"),'off').''; } else if($conf->global->USER_MAIL_REQUIRED == 1) { print ''.img_picto($langs->trans("Enabled"),'on').''; } } print '
'; print '
'; $db->close(); print '
'; llxFooter('$Date: 2011/07/31 22:23:21 $ - $Revision: 1.5 $'); ?>