diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index dee97c1ba63..bf125f383bf 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005 Laurent Destailleur +/* Copyright (C) 2004 Rodolphe Quiedeville + * Copyright (C) 2005-2006 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 @@ -36,56 +36,53 @@ if (!$user->admin) if ($_POST["action"] == 'setvalue' && $user->admin) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'CLICKTODIAL_URL'"; - - $db->query($sql); - - $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible)"; - $sql .= " VALUES ('CLICKTODIAL_URL','".$_POST["url"]."',0)"; - - if ($db->query($sql)) - { - Header("Location: clicktodial.php"); - } - else - { - dolibarr_print_error($db); + $result=dolibarr_set_const($db, "CLICKTODIAL_URL",$_POST["url"]); + if ($result >= 0) + { + $mesg='
'.$langs->trans("Success").'
'; + } + else + { + dolibarr_error($db); } } -llxHeader(); /* * * */ +llxHeader(); + print_titre($langs->trans("ClickToDialSetup")); +if ($mesg) print '
'.$mesg; + print '
'; print '
'; print ''; -print ''; + +$var=true; + +print '
'; print ''; print ''; print ''; print "\n"; -print ''; -print ''; +print ''; print '
'.$langs->trans("Name").''.$langs->trans("NewValue").''.$langs->trans("CurrentValue").'
'; +$var=!$var; +print '
'; print $langs->trans("URL").''; -print ''; +print ''; print ''; -print CLICKTODIAL_URL; +print $conf->global->CLICKTODIAL_URL; print '
'; -/* - * - * - */ - $db->close(); -llxFooter(); +llxFooter('$Date$ - $Revision$'); + ?> diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php new file mode 100644 index 00000000000..e39e78f1126 --- /dev/null +++ b/htdocs/admin/mailing.php @@ -0,0 +1,90 @@ + + * Copyright (C) 2005-2006 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. + * + * $Id$ + * $Source$ + */ + +/** + \file htdocs/admin/mailing.php + \ingroup mailing + \brief Page d'administration/configuration du module mailing + \version $Revision$ +*/ + +require("./pre.inc.php"); + +$langs->load("admin"); + +if (!$user->admin) + accessforbidden(); + + +if ($_POST["action"] == 'setvalue' && $user->admin) +{ + $result=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$_POST["email_from"]); + if ($result >= 0) + { + $mesg='
'.$langs->trans("Success").'
'; + } + else + { + dolibarr_error($db); + } +} + + + +/* + * + * + */ + +llxHeader(); + +print_titre($langs->trans("MailingSetup")); + +if ($mesg) print '
'.$mesg; + +print '
'; +print '
'; +print ''; + +$var=true; + +print ''; +print ''; +print ''; +print ''; +print "\n"; +$var=!$var; +print ''; + +print ''; +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; +print $langs->trans("MailingEMailFrom").''; +print ''; +print '
'; + + +$db->close(); + + +llxFooter('$Date$ - $Revision$'); + +?> diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index bb1b28e5f47..74f2686ac01 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -411,7 +411,10 @@ BarcodeSetup=Barcode setup PaperFormatModule=Print' format module BarcodeEncodeModule=Barcode' encodage type ##### Prelevements ##### -WithdrawalsSetup=Withdrawal setup +WithdrawalsSetup=Withdrawal module setup ##### ExternalRSS ##### ExternalRSSSetup=External RSS imports setup -NewRSS=New RSS \ No newline at end of file +NewRSS=New RSS +##### Mailing ##### +MailingSetup=Mailing module setup +MailingEMailFrom=Sender EMail (From) for emails sent by emailing module \ No newline at end of file diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index da542a3c0d6..0f14b1d3759 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -416,4 +416,7 @@ WithdrawalsSetup=Configuration du module pr ##### ExternalRSS ##### ExternalRSSSetup=Configuration des imports de flux RSS NewRSS=Syndication d'un nouveau flux RSS +##### Mailing ##### +MailingSetup=Configuration du module EMailing +MailingEMailFrom=Email emetteur (From) des mails envoyés par EMailing diff --git a/mysql/data/data.sql b/mysql/data/data.sql index 91a2b802aa5..a7cb50269fc 100644 --- a/mysql/data/data.sql +++ b/mysql/data/data.sql @@ -116,7 +116,7 @@ insert into llx_const (name, value, type, note, visible) values ('ADHERENT_MAIL_ -- -- Mail Mailing -- -insert into llx_const (name, value, type, note) values ('MAILING_EMAIL_FROM','mailing@domain.com','chaine','EMail emmetteur pour les envois de mailings'); +insert into llx_const (name, value, type, note, visible) values ('MAILING_EMAIL_FROM','dolibarr@domain.com','chaine','EMail emmetteur pour les envois d\'emailings',0); -- -- Mailman