* * 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. * * $Id$ * $Source$ */ /** \file htdocs/admin/mails.php \brief Page de configuration des emails \version $Revision$ */ require("./pre.inc.php"); $langs->load("companies"); $langs->load("products"); $langs->load("admin"); if (!$user->admin) accessforbidden(); if (isset($_POST["action"]) && $_POST["action"] == 'update') { dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT", $_POST["MAIN_MAIL_SMTP_PORT"]); dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER", $_POST["MAIN_MAIL_SMTP_SERVER"]); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM", $_POST["MAIN_MAIL_EMAIL_FROM"]); dolibarr_set_const($db, "MAIN_DISABLE_ALL_MAILS", $_POST["MAIN_DISABLE_ALL_MAILS"]); $_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer Header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; } llxHeader(); print_fiche_titre($langs->trans("EMailsSetup"),'','setup'); print $langs->trans("EMailsDesc")."
\n"; print "
\n"; if (isset($_GET["action"]) && $_GET["action"] == 'edit') { $html=new Form($db); print '
'; print ''; clearstatcache(); $var=true; print ''; print ''; $var=!$var; print ''; $var=!$var; print ''; $var=!$var; print ''; $var=!$var; print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT",ini_get('smtp_port')?ini_get('smtp_port'):$langs->transnoentities("Undefined")).'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER",ini_get('SMTP')?ini_get('SMTP'):$langs->transnoentities("Undefined")).'
'.$langs->trans("MAIN_MAIL_EMAIL_FROM",ini_get('sendmail_from')?ini_get('sendmail_from'):$langs->transnoentities("Undefined")).'
'.$langs->trans("MAIN_DISABLE_ALL_MAILS").''; print $html->selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1); print '
'; print '
'; print ''; print '
'; print '
'; print '
'; } else { $var=true; print ''; print ''; $var=!$var; print ''; $var=!$var; print ''; $var=!$var; print ''; $var=!$var; print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT",ini_get('smtp_port')?ini_get('smtp_port'):$langs->transnoentities("Undefined")).''.$conf->global->MAIN_MAIL_SMTP_PORT.'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER",ini_get('SMTP')?ini_get('SMTP'):$langs->transnoentities("Undefined")).''.$conf->global->MAIN_MAIL_SMTP_SERVER.'
'.$langs->trans("MAIN_MAIL_EMAIL_FROM",ini_get('sendmail_from')?ini_get('sendmail_from'):$langs->transnoentities("Undefined")).''.$conf->global->MAIN_MAIL_EMAIL_FROM.'
'.$langs->trans("MAIN_DISABLE_ALL_MAILS").''.yn($conf->global->MAIN_DISABLE_ALL_MAILS).'

'; print '
'; print ''.$langs->trans("Edit").''; print '
'; } $db->close(); llxFooter('$Date$ - $Revision$'); ?>