diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index bc0c2241e71..5c52983cf88 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -1,5 +1,6 @@ + * Copyright (C) 2005 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 @@ -20,20 +21,28 @@ * */ +/** \file htdocs/comm/mailing/cibles.php + \brief Page des cibles de mailing + \version $Revision$ +*/ + require("./pre.inc.php"); +$langs->load("mails"); + $mesg = ''; -llxHeader("","","Fiche mailing"); +llxHeader("","",$langs->trans("MailCard")); -if ($cancel == $langs->trans("Cancel")) +if ($_POST["cancel"] == $langs->trans("Cancel")) { $action = ''; } + /* - * Création + * Fiche mailing en mode création * */ @@ -46,20 +55,20 @@ if ($mil->fetch($_GET["id"]) == 0) $h=0; $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++; $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; $h++; dolibarr_fiche_head($head, $hselected, substr($mil->titre,0,20)); - print_titre("Mailing"); + print_titre($langs->trans("Mailing")); - print ''; + print '
'; print ''; print '
Nom'.$mil->titre.'
'; @@ -78,7 +87,7 @@ if ($mil->fetch($_GET["id"]) == 0) $num = $db->num_rows(); print '
'; - print ''; + print ''; $var = true; $i = 0; diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 6a170d9b9ad..67dc43790ef 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -1,5 +1,6 @@ + * Copyright (C) 2005 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 @@ -20,10 +21,18 @@ * */ +/** \file htdocs/comm/mailing/fiche.php + \brief Fiche mailing, onglet général + \version $Revision$ +*/ + require("./pre.inc.php"); +$langs->load("mails"); + $mesg = ''; + if ($_POST["action"] == 'add') { $mil = new Mailing($db); @@ -39,6 +48,7 @@ if ($_POST["action"] == 'add') } } + if ($_POST["action"] == 'update') { $mil = new Mailing($db); @@ -55,6 +65,7 @@ if ($_POST["action"] == 'update') } } + if ($_POST["action"] == 'confirm_valide') { @@ -70,7 +81,7 @@ if ($_POST["action"] == 'confirm_valide') } else { - print "Erreur"; + dolibarr_print_error($db); } } else @@ -94,7 +105,7 @@ if ($_POST["action"] == 'confirm_approve') } else { - print "Erreur"; + dolibarr_print_error($db); } } else @@ -103,9 +114,13 @@ if ($_POST["action"] == 'confirm_approve') } } + + + + llxHeader("","","Fiche Mailing"); -if ($cancel == $langs->trans("Cancel")) +if ($_POST["cancel"] == $langs->trans("Cancel")) { $action = ''; } @@ -122,17 +137,17 @@ if ($_GET["action"] == 'create') print '
'."\n"; print ''; - print_titre("Nouveau Mailing"); + print_titre($langs->trans("NewMailing")); - print '
'.$langs->trans("Destinataires").'
'.$langs->trans("MailTargets").'
'; + print '
'; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; print '
Titre
'.$langs->trans("MailTitle").'
Sujet (sujet du mail)
'.$langs->trans("MailTopic").'
Message
'.$langs->trans("MailMessage").'
'; print ''; } @@ -144,12 +159,12 @@ else $h=0; $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; $h++; $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++; dolibarr_fiche_head($head, $hselected, substr($mil->titre,0,20)); @@ -166,6 +181,7 @@ else "Confirmez-vous la validation du mailing ?", "confirm_valide"); } + /* * Confirmation de l'approbation du mailing * @@ -180,17 +196,12 @@ else print_titre("Mailing"); - print ''; + print '
'; - print ''; + print ''; - print ''; - print ''; - - print ''; + print ''; + print ''; //print ''; //print ''; @@ -200,21 +211,20 @@ else print ''; } - print ''; + print ''; $uc = new User($db, $mil->user_creat); $uc->fetch(); - print ''; - print ''; + print ''; + print ''; print ''; - if ($mil->statut > 0) { $uv = new User($db, $mil->user_valid); $uv->fetch(); - print ''; - print ''; + print ''; + print ''; print ''; } @@ -222,28 +232,42 @@ else { $ua = new User($db, $mil->user_appro); $ua->fetch(); - print ''; - print ''; + print ''; + print ''; print ''; } - print '
Titre'.$mil->titre.'
'.$langs->trans("MailTitle").''.$mil->titre.'
Emetteur'.htmlentities($mil->email_from).'Email'.htmlentities($mil->email_from).'
Message'; - - print 'Sujet : '.$mil->sujet.'

'; - print nl2br($mil->body).'
'.$langs->trans("MailSender").''.htmlentities($mil->email_from).''.$langs->trans("EMail").''.htmlentities($mil->email_from).'
Réponse'.htmlentities($mil->email_replyto).'
Retour Erreur'.htmlentities($mil->email_errorsto).'
Nb destinataires'.$mil->nbemail.'
Statut'.$mil->statuts[$mil->statut].'
'.$langs->trans("Status").''.$mil->statuts[$mil->statut].'
Créé par'.$uc->fullname.'le
'.$langs->trans("CreatedBy").''.$uc->fullname.''.$langs->trans("DateCreation").''.strftime("%d %b %Y %H:%M", $mil->date_creat).'
Validé par'.$uv->fullname.'le
'.$langs->trans("ValidatedBy").''.$uv->fullname.''.$langs->trans("Date").''.strftime("%d %b %Y %H:%M", $mil->date_valid).'
Approuvé par'.$ua->fullname.'le
'.$langs->trans("ApprovedBy").''.$ua->fullname.''.$langs->trans("Date").''.strftime("%d %b %Y %H:%M", $mil->date_appro).'
'; + // Contenu du mail + print ''.$langs->trans("MailTopic").''.$mil->sujet.''; + + print ''.$langs->trans("MailMessage").''; + print nl2br($mil->body).''; + + + print '
'; + + print ""; + + + /* + * Boutons d'action + */ print "\n\n
\n"; if ($_GET["action"] == '') { - print ''.$langs->trans("Tester").''; + print ''.$langs->trans("TestMailing").''; if ($mil->statut == 0) { - print ''.$langs->trans("Valider").''; + print ''.$langs->trans("ValidMailing").''; } if ($mil->statut == 1 && $mil->nbemail > 0) { - print ''.$langs->trans("Approuver").''; + print ''.$langs->trans("ApproveMailing").''; } diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index f5ee8fd9323..799c2d11852 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -40,6 +40,7 @@ TestConnection=Test connection Show=Show Search=Search Valid=Valid +Approve=Approve Upload=Send file CreatedBy=Created by ModifiedBy=Modified by @@ -158,4 +159,5 @@ New=New Discount=Discount Unknown=Inconnu General=General -Size=Size \ No newline at end of file +Size=Size +Topic=Sujet \ No newline at end of file diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 4e9b5d2a568..03ccd75e40e 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -7,16 +7,5 @@ ErrorPasswordDiffers=Passwords differs, please type them again. ErrorForbidden=Access forbidden.
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. 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 -Tools=Tools -NewMailing=New mailing \ No newline at end of file +Tools=Tools \ No newline at end of file diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index e2d793507b7..ae5b14a1702 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -40,6 +40,7 @@ TestConnection=Tester la connexion Show=Voir Search=Rechercher Valid=Valider +Approve=Approuver Upload=Envoyer fichier CreatedBy=Créé par ModifiedBy=Modifié par @@ -159,4 +160,5 @@ Discount=Remise Unknown=Inconnu General=Général Size=Taille -Received=Reçu \ No newline at end of file +Received=Reçu +Topic=Sujet \ No newline at end of file diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index df2446cb9dc..e91f60536ef 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -7,16 +7,5 @@ ErrorPasswordDiffers=Les mots de passe ne sont pas identiques, veuillez les sais ErrorForbidden=Accès non autorisé.
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. 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 -Tools=Outils -NewMailing=Nouveau mailing \ No newline at end of file +Tools=Outils \ No newline at end of file