New: Ajout page configuration du module emailing
This commit is contained in:
parent
f06fb40f4e
commit
2bcb357dba
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.org>
|
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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)
|
if ($_POST["action"] == 'setvalue' && $user->admin)
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'CLICKTODIAL_URL'";
|
$result=dolibarr_set_const($db, "CLICKTODIAL_URL",$_POST["url"]);
|
||||||
|
if ($result >= 0)
|
||||||
$db->query($sql);
|
{
|
||||||
|
$mesg='<div class="ok">'.$langs->trans("Success").'</div>';
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible)";
|
}
|
||||||
$sql .= " VALUES ('CLICKTODIAL_URL','".$_POST["url"]."',0)";
|
else
|
||||||
|
{
|
||||||
if ($db->query($sql))
|
dolibarr_error($db);
|
||||||
{
|
|
||||||
Header("Location: clicktodial.php");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dolibarr_print_error($db);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
print_titre($langs->trans("ClickToDialSetup"));
|
print_titre($langs->trans("ClickToDialSetup"));
|
||||||
|
|
||||||
|
if ($mesg) print '<br>'.$mesg;
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<form method="post" action="clicktodial.php">';
|
print '<form method="post" action="clicktodial.php">';
|
||||||
print '<input type="hidden" name="action" value="setvalue">';
|
print '<input type="hidden" name="action" value="setvalue">';
|
||||||
print '<table class="border">';
|
|
||||||
|
$var=true;
|
||||||
|
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
print '<td>'.$langs->trans("NewValue").'</td><td>'.$langs->trans("CurrentValue").'</td>';
|
print '<td>'.$langs->trans("NewValue").'</td><td>'.$langs->trans("CurrentValue").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
print '<tr><td>';
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>';
|
||||||
print $langs->trans("URL").'</td><td>';
|
print $langs->trans("URL").'</td><td>';
|
||||||
print '<input size="25" type="text" name="url" value="'.CLICKTODIAL_URL.'">';
|
print '<input size="25" type="text" name="url" value="'.$conf->global->CLICKTODIAL_URL.'">';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print CLICKTODIAL_URL;
|
print $conf->global->CLICKTODIAL_URL;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td colspan="3" align="center"><input type="submit" value="'.$langs->trans("Modify").'"></td></tr>';
|
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
|
||||||
print '</table></form>';
|
print '</table></form>';
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter();
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
90
htdocs/admin/mailing.php
Normal file
90
htdocs/admin/mailing.php
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||||
|
*
|
||||||
|
* 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='<div class="ok">'.$langs->trans("Success").'</div>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dolibarr_error($db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
|
print_titre($langs->trans("MailingSetup"));
|
||||||
|
|
||||||
|
if ($mesg) print '<br>'.$mesg;
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
print '<input type="hidden" name="action" value="setvalue">';
|
||||||
|
|
||||||
|
$var=true;
|
||||||
|
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
|
print '<td>'.$langs->trans("Value").'</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'><td>';
|
||||||
|
print $langs->trans("MailingEMailFrom").'</td><td>';
|
||||||
|
print '<input size="32" type="text" name="email_from" value="'.$conf->global->MAILING_EMAIL_FROM.'">';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
|
||||||
|
print '</table></form>';
|
||||||
|
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|
||||||
|
|
||||||
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|
||||||
|
?>
|
||||||
@ -411,7 +411,10 @@ BarcodeSetup=Barcode setup
|
|||||||
PaperFormatModule=Print' format module
|
PaperFormatModule=Print' format module
|
||||||
BarcodeEncodeModule=Barcode' encodage type
|
BarcodeEncodeModule=Barcode' encodage type
|
||||||
##### Prelevements #####
|
##### Prelevements #####
|
||||||
WithdrawalsSetup=Withdrawal setup
|
WithdrawalsSetup=Withdrawal module setup
|
||||||
##### ExternalRSS #####
|
##### ExternalRSS #####
|
||||||
ExternalRSSSetup=External RSS imports setup
|
ExternalRSSSetup=External RSS imports setup
|
||||||
NewRSS=New RSS
|
NewRSS=New RSS
|
||||||
|
##### Mailing #####
|
||||||
|
MailingSetup=Mailing module setup
|
||||||
|
MailingEMailFrom=Sender EMail (From) for emails sent by emailing module
|
||||||
@ -416,4 +416,7 @@ WithdrawalsSetup=Configuration du module pr
|
|||||||
##### ExternalRSS #####
|
##### ExternalRSS #####
|
||||||
ExternalRSSSetup=Configuration des imports de flux RSS
|
ExternalRSSSetup=Configuration des imports de flux RSS
|
||||||
NewRSS=Syndication d'un nouveau 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
|
||||||
|
|
||||||
|
|||||||
@ -116,7 +116,7 @@ insert into llx_const (name, value, type, note, visible) values ('ADHERENT_MAIL_
|
|||||||
--
|
--
|
||||||
-- Mail Mailing
|
-- 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
|
-- Mailman
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user