Trad: Traduction du nouvel outil de mailing.

This commit is contained in:
Laurent Destailleur 2005-01-14 19:24:00 +00:00
parent 972567c367
commit b3160952d1
6 changed files with 81 additions and 66 deletions

View File

@ -1,5 +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@uers.sourceforge.net>
* *
* 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
@ -20,20 +21,28 @@
* *
*/ */
/** \file htdocs/comm/mailing/cibles.php
\brief Page des cibles de mailing
\version $Revision$
*/
require("./pre.inc.php"); require("./pre.inc.php");
$langs->load("mails");
$mesg = ''; $mesg = '';
llxHeader("","","Fiche mailing"); llxHeader("","",$langs->trans("MailCard"));
if ($cancel == $langs->trans("Cancel")) if ($_POST["cancel"] == $langs->trans("Cancel"))
{ {
$action = ''; $action = '';
} }
/* /*
* Création * Fiche mailing en mode création
* *
*/ */
@ -46,20 +55,20 @@ if ($mil->fetch($_GET["id"]) == 0)
$h=0; $h=0;
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$mil->id; $head[$h][0] = DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$mil->id;
$head[$h][1] = $langs->trans("Fiche"); $head[$h][1] = $langs->trans("MailCard");
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$mil->id; $head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$mil->id;
$head[$h][1] = $langs->trans('Destinatires'); $head[$h][1] = $langs->trans("MailTargets");
$hselected = $h; $hselected = $h;
$h++; $h++;
dolibarr_fiche_head($head, $hselected, substr($mil->titre,0,20)); dolibarr_fiche_head($head, $hselected, substr($mil->titre,0,20));
print_titre("Mailing"); print_titre($langs->trans("Mailing"));
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; print '<table class="border" width="100%">';
print '<tr><td width="20%">Nom</td><td>'.$mil->titre.'</td></tr>'; print '<tr><td width="20%">Nom</td><td>'.$mil->titre.'</td></tr>';
print '</table>'; print '</table>';
@ -78,7 +87,7 @@ if ($mil->fetch($_GET["id"]) == 0)
$num = $db->num_rows(); $num = $db->num_rows();
print '<br /><table class="noborder" width="100%">'; print '<br /><table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Destinataires").'</td></tr>'; print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("MailTargets").'</td></tr>';
$var = true; $var = true;
$i = 0; $i = 0;

View File

@ -1,5 +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@uers.sourceforge.net>
* *
* 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
@ -20,10 +21,18 @@
* *
*/ */
/** \file htdocs/comm/mailing/fiche.php
\brief Fiche mailing, onglet général
\version $Revision$
*/
require("./pre.inc.php"); require("./pre.inc.php");
$langs->load("mails");
$mesg = ''; $mesg = '';
if ($_POST["action"] == 'add') if ($_POST["action"] == 'add')
{ {
$mil = new Mailing($db); $mil = new Mailing($db);
@ -39,6 +48,7 @@ if ($_POST["action"] == 'add')
} }
} }
if ($_POST["action"] == 'update') if ($_POST["action"] == 'update')
{ {
$mil = new Mailing($db); $mil = new Mailing($db);
@ -55,6 +65,7 @@ if ($_POST["action"] == 'update')
} }
} }
if ($_POST["action"] == 'confirm_valide') if ($_POST["action"] == 'confirm_valide')
{ {
@ -70,7 +81,7 @@ if ($_POST["action"] == 'confirm_valide')
} }
else else
{ {
print "Erreur"; dolibarr_print_error($db);
} }
} }
else else
@ -94,7 +105,7 @@ if ($_POST["action"] == 'confirm_approve')
} }
else else
{ {
print "Erreur"; dolibarr_print_error($db);
} }
} }
else else
@ -103,9 +114,13 @@ if ($_POST["action"] == 'confirm_approve')
} }
} }
llxHeader("","","Fiche Mailing"); llxHeader("","","Fiche Mailing");
if ($cancel == $langs->trans("Cancel")) if ($_POST["cancel"] == $langs->trans("Cancel"))
{ {
$action = ''; $action = '';
} }
@ -122,17 +137,17 @@ if ($_GET["action"] == 'create')
print '<form action="fiche.php" method="post">'."\n"; print '<form action="fiche.php" method="post">'."\n";
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';
print_titre("Nouveau Mailing"); print_titre($langs->trans("NewMailing"));
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; print '<table class="border" width="100%">';
print '<tr><td width="20%">Titre</td><td><input name="titre" size="30" value=""></td></tr>'; print '<tr><td width="20%">'.$langs->trans("MailTitle").'</td><td><input name="titre" size="30" value=""></td></tr>';
print '<tr><td width="20%">Sujet</td><td><input name="sujet" size="40" value=""> (sujet du mail)</td></tr>'; print '<tr><td width="20%">'.$langs->trans("MailTopic").'</td><td><input name="sujet" size="40" value=""></td></tr>';
print '<tr><td width="20%" valign="top">Message</td><td><textarea cols="30" rows="8" name="body"></textarea></td></tr>'; print '<tr><td width="20%" valign="top">'.$langs->trans("MailMessage").'</td><td><textarea cols="30" rows="8" name="body"></textarea></td></tr>';
print '<tr><td colspan="2" align="center"><input type="submit" value="Créer"></td></tr>'; print '<tr><td colspan="2" align="center"><input type="submit" value="'.$langs->trans("CreateMailing").'"></td></tr>';
print '</table>'; print '</table>';
print '</form>'; print '</form>';
} }
@ -144,12 +159,12 @@ else
$h=0; $h=0;
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$mil->id; $head[$h][0] = DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$mil->id;
$head[$h][1] = $langs->trans("Fiche"); $head[$h][1] = $langs->trans("MailCard");
$hselected = $h; $hselected = $h;
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$mil->id; $head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$mil->id;
$head[$h][1] = $langs->trans('Destinatires'); $head[$h][1] = $langs->trans('MailTargets');
$h++; $h++;
dolibarr_fiche_head($head, $hselected, substr($mil->titre,0,20)); dolibarr_fiche_head($head, $hselected, substr($mil->titre,0,20));
@ -166,6 +181,7 @@ else
"Confirmez-vous la validation du mailing ?", "Confirmez-vous la validation du mailing ?",
"confirm_valide"); "confirm_valide");
} }
/* /*
* Confirmation de l'approbation du mailing * Confirmation de l'approbation du mailing
* *
@ -180,17 +196,12 @@ else
print_titre("Mailing"); print_titre("Mailing");
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">'; print '<table class="border" width="100%">';
print '<tr><td width="20%">Titre</td><td colspan="3">'.$mil->titre.'</td></tr>'; print '<tr><td width="20%">'.$langs->trans("MailTitle").'</td><td colspan="3">'.$mil->titre.'</td></tr>';
print '<tr><td width="20%">Emetteur</td><td>'.htmlentities($mil->email_from).'</td>'; print '<tr><td width="20%">'.$langs->trans("MailSender").'</td><td>'.htmlentities($mil->email_from).'</td>';
print '<td>Email</td><td>'.htmlentities($mil->email_from).'</td></tr>'; print '<td>'.$langs->trans("EMail").'</td><td>'.htmlentities($mil->email_from).'</td></tr>';
print '<tr><td width="20%" valign="top">Message</td><td colspan="3">';
print 'Sujet : '.$mil->sujet.'<br/><br />';
print nl2br($mil->body).'</td></tr>';
//print '<tr><td width="20%">Réponse</td><td>'.htmlentities($mil->email_replyto).'</td></tr>'; //print '<tr><td width="20%">Réponse</td><td>'.htmlentities($mil->email_replyto).'</td></tr>';
//print '<tr><td width="20%">Retour Erreur</td><td>'.htmlentities($mil->email_errorsto).'</td></tr>'; //print '<tr><td width="20%">Retour Erreur</td><td>'.htmlentities($mil->email_errorsto).'</td></tr>';
@ -200,21 +211,20 @@ else
print '<tr><td width="20%">Nb destinataires</td><td colspan="3">'.$mil->nbemail.'</td></tr>'; print '<tr><td width="20%">Nb destinataires</td><td colspan="3">'.$mil->nbemail.'</td></tr>';
} }
print '<tr><td width="20%">Statut</td><td colspan="3">'.$mil->statuts[$mil->statut].'</td></tr>'; print '<tr><td width="20%">'.$langs->trans("Status").'</td><td colspan="3">'.$mil->statuts[$mil->statut].'</td></tr>';
$uc = new User($db, $mil->user_creat); $uc = new User($db, $mil->user_creat);
$uc->fetch(); $uc->fetch();
print '<tr><td width="20%">Créé par</td><td>'.$uc->fullname.'</td>'; print '<tr><td width="20%">'.$langs->trans("CreatedBy").'</td><td>'.$uc->fullname.'</td>';
print '<td>le</td>'; print '<td>'.$langs->trans("DateCreation").'</td>';
print '<td>'.strftime("%d %b %Y %H:%M", $mil->date_creat).'</td></tr>'; print '<td>'.strftime("%d %b %Y %H:%M", $mil->date_creat).'</td></tr>';
if ($mil->statut > 0) if ($mil->statut > 0)
{ {
$uv = new User($db, $mil->user_valid); $uv = new User($db, $mil->user_valid);
$uv->fetch(); $uv->fetch();
print '<tr><td width="20%">Validé par</td><td>'.$uv->fullname.'</td>'; print '<tr><td width="20%">'.$langs->trans("ValidatedBy").'</td><td>'.$uv->fullname.'</td>';
print '<td>le</td>'; print '<td>'.$langs->trans("Date").'</td>';
print '<td>'.strftime("%d %b %Y %H:%M", $mil->date_valid).'</td></tr>'; print '<td>'.strftime("%d %b %Y %H:%M", $mil->date_valid).'</td></tr>';
} }
@ -222,28 +232,42 @@ else
{ {
$ua = new User($db, $mil->user_appro); $ua = new User($db, $mil->user_appro);
$ua->fetch(); $ua->fetch();
print '<tr><td width="20%">Approuvé par</td><td>'.$ua->fullname.'</td>'; print '<tr><td width="20%">'.$langs->trans("ApprovedBy").'</td><td>'.$ua->fullname.'</td>';
print '<td>le</td>'; print '<td>'.$langs->trans("Date").'</td>';
print '<td>'.strftime("%d %b %Y %H:%M", $mil->date_appro).'</td></tr>'; print '<td>'.strftime("%d %b %Y %H:%M", $mil->date_appro).'</td></tr>';
} }
print '</table>'; // Contenu du mail
print '<tr><td width="20%">'.$langs->trans("MailTopic").'</td><td colspan="3">'.$mil->sujet.'</td></tr>';
print '<tr><td width="20%" valign="top">'.$langs->trans("MailMessage").'</td><td colspan="3">';
print nl2br($mil->body).'</td></tr>';
print '</table><br>';
print "</div>";
/*
* Boutons d'action
*/
print "\n\n<div class=\"tabsAction\">\n"; print "\n\n<div class=\"tabsAction\">\n";
if ($_GET["action"] == '') if ($_GET["action"] == '')
{ {
print '<a class="tabAction" href="fiche.php?action=test&amp;id='.$mil->id.'">'.$langs->trans("Tester").'</a>'; print '<a class="tabAction" href="fiche.php?action=test&amp;id='.$mil->id.'">'.$langs->trans("TestMailing").'</a>';
if ($mil->statut == 0) if ($mil->statut == 0)
{ {
print '<a class="tabAction" href="fiche.php?action=valide&amp;id='.$mil->id.'">'.$langs->trans("Valider").'</a>'; print '<a class="tabAction" href="fiche.php?action=valide&amp;id='.$mil->id.'">'.$langs->trans("ValidMailing").'</a>';
} }
if ($mil->statut == 1 && $mil->nbemail > 0) if ($mil->statut == 1 && $mil->nbemail > 0)
{ {
print '<a class="tabAction" href="fiche.php?action=approve&amp;id='.$mil->id.'">'.$langs->trans("Approuver").'</a>'; print '<a class="tabAction" href="fiche.php?action=approve&amp;id='.$mil->id.'">'.$langs->trans("ApproveMailing").'</a>';
} }

View File

@ -40,6 +40,7 @@ TestConnection=Test connection
Show=Show Show=Show
Search=Search Search=Search
Valid=Valid Valid=Valid
Approve=Approve
Upload=Send file Upload=Send file
CreatedBy=Created by CreatedBy=Created by
ModifiedBy=Modified by ModifiedBy=Modified by
@ -158,4 +159,5 @@ New=New
Discount=Discount Discount=Discount
Unknown=Inconnu Unknown=Inconnu
General=General General=General
Size=Size Size=Size
Topic=Sujet

View File

@ -7,16 +7,5 @@ ErrorPasswordDiffers=Passwords differs, please type them again.
ErrorForbidden=Access forbidden.<br>You try to access to a page, area or feature that is not allowed to your user. ErrorForbidden=Access forbidden.<br>You try to access to a page, area or feature that is not allowed to your user.
ErrorForbidden2=Permission for this login can be defined by your Dolibarr administrator from menu %s->%s. ErrorForbidden2=Permission for this login can be defined by your Dolibarr administrator from menu %s->%s.
ErrorForbidden3=It seems that Dolibarr is not used through an authenticated session. Take a look at Dolibarr setup documentation to know how to manage authentications (htaccess, mod_auth or other...). ErrorForbidden3=It seems that Dolibarr is not used through an authenticated session. Take a look at Dolibarr setup documentation to know how to manage authentications (htaccess, mod_auth or other...).
Mailing=Mailing
MailingDesc=This page allows you to send mailings to a group of people.
MailingResult=Sending mails result
MailFrom=Sender
MailReply=Reply to
MailTo=Receiver(s)
MailCC=Copy to
MailTopic=Subject
MailText=Message
MailFile=Attach a file
AddTrip=Add trip AddTrip=Add trip
Tools=Tools Tools=Tools
NewMailing=New mailing

View File

@ -40,6 +40,7 @@ TestConnection=Tester la connexion
Show=Voir Show=Voir
Search=Rechercher Search=Rechercher
Valid=Valider Valid=Valider
Approve=Approuver
Upload=Envoyer fichier Upload=Envoyer fichier
CreatedBy=Créé par CreatedBy=Créé par
ModifiedBy=Modifié par ModifiedBy=Modifié par
@ -159,4 +160,5 @@ Discount=Remise
Unknown=Inconnu Unknown=Inconnu
General=Général General=Général
Size=Taille Size=Taille
Received=Reçu Received=Reçu
Topic=Sujet

View File

@ -7,16 +7,5 @@ ErrorPasswordDiffers=Les mots de passe ne sont pas identiques, veuillez les sais
ErrorForbidden=Accès non autorisé.<br>Vous essayez d'accéder à une page, zone ou fonction qui n'est pas autorisée pour votre compte utilisateur. ErrorForbidden=Accès non autorisé.<br>Vous essayez d'accéder à une page, zone ou fonction qui n'est pas autorisée pour votre compte utilisateur.
ErrorForbidden2=Les permissions pour ce login peuvent être attribuée par l'administrateur Dolibarr via le menu %s->%s. ErrorForbidden2=Les permissions pour ce login peuvent être attribuée par l'administrateur Dolibarr via le menu %s->%s.
ErrorForbidden3=Dolibarr ne semble pas fonctionner au sein d'une session authentifiée. Consulter la documentation d'installation de Dolibarr pour connaitre comment gérer les autentifications (htaccess, mod_auth ou autre...). ErrorForbidden3=Dolibarr ne semble pas fonctionner au sein d'une session authentifiée. Consulter la documentation d'installation de Dolibarr pour connaitre comment gérer les autentifications (htaccess, mod_auth ou autre...).
Mailing=Mailing
MailingDesc=Cet écran vous permet d'envoyer des mailing à un groupe de personne.
MailingResult=Résultat de l'envoi du mailing
MailFrom=Emetteur
MailReply=Répondre à
MailTo=Destinataire(s)
MailCC=Copie à
MailTopic=Sujet
MailText=Message
MailFile=Joindre un fichier
AddTrip=Créer déplacement AddTrip=Créer déplacement
Tools=Outils Tools=Outils
NewMailing=Nouveau mailing