Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\population\send_email.jsp
<% /****************************************************************************** * Copyright (c) 2000-2004 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. * * ******************************************************************************/ %><%@page session="true"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.ActorBean" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.PopulationBean" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.MessagesBean" %> <%@ page import="com.edeal.frontline.AccessDeniedException" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); /*String popID = flRequest.getParameter("popID"); String msgID = flRequest.getParameter("msgID"); Boolean attQueued = (Boolean)flRequest.getAttribute("HasToBeQueued"); boolean hasToBeQueued = false; if (attQueued != null) { hasToBeQueued = attQueued.booleanValue(); }*/ //CONSTANTES DE LIMITES //LIMITE DE TAILLE DU MESSAGE EN KILOOCTETS AU-DELA DE LAQUELLE L'ENVOI DOIT ETRE REGULE int MAX_MSG_SIZE = 50; //LIMITE DE NOMBRE D'INDIVIDUS DE LA POPULATION AU-DELA DE LAQUELLE L'ENVOI DOIT ETRE REGULE int MAX_POP_SIZE = 200; String actorID = (String) session.getAttribute("actorID"); String popID = Utils.getRequestParameter(context, request, "popID"); String msgID = Utils.getRequestParameter(context, request, "msgID"); boolean hasToBeQueued = false; if (!hasToBeQueued) { MessagesBean message = null; try { message = new MessagesBean(msgID, context); /* This does not compile with Tomcat 4 com.edeal.frontline.MessagesBean$Mail mail = message.getMail(null, null); ByteArrayOutputStream stream = new ByteArrayOutputStream(); mail.getMimeMessage().writeTo(stream); int size = stream.size(); //size in bytes */ int size = message.getMailSize(); if(size > MAX_MSG_SIZE * 1000) hasToBeQueued = true; } catch (FrontlineException e) { } catch (AccessDeniedException e) { } } if (!hasToBeQueued) { PopulationBean population = null; try { population = new PopulationBean(popID, context); if(population.getPopTotNbr() + population.getPopAddNbr() - population.getPopRmvNbr() > MAX_POP_SIZE) hasToBeQueued = true; } catch (FrontlineException e) { } catch (AccessDeniedException e) { } } //depending on the size of the population and the size of the message, we could have two or three radio buttons, //which complicates the javascript a little... String indexImmediat1 = hasToBeQueued ? "-1" : "0"; String indexDiffere = hasToBeQueued ? "1" : "2"; %> <html> <head> <title><fl:getMessage code="L2025" alt="E-DEAL"/></title> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link rel="stylesheet" href="<fl:webapp/>/css/master_css.jsp" type="text/css"> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/presentField.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ajax/sarissa.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ajax/ajax.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/master_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ac/fobAC_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/checkFields.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/calendar.jsp"></script> <script type="text/javascript" language="javascript"> function doSubmit() { f = document.forms[0]; if (f.mode[0].checked == false && f.mode[1].checked == false <%= hasToBeQueued ? "" : "&& f.mode[2].checked == false" %>) { alert('<fl:getMessage code="M606D" alt="Veuillez choisir un mode d\'envoi." js="true"/>'); return false; } if (<%=indexImmediat1%> != -1 && f.mode[<%=indexImmediat1%>].checked == true) f.queued.value = 'false'; else f.queued.value = 'true'; if (f.mode[<%=indexDiffere%>].checked == true) { if (f.activationDate.value == "") { alert('<fl:getMessage code="M2006" alt="Veuillez saisir une date." js="true"/>'); f.activationDate.focus(); return false; } if (checkField(f.activationDate.value, "date", true, 'dd/mm/yyyy', 'DD/MM/yyyy') == false) { alert('<fl:getMessage code="M200A" alt="Veuillez saisir une date correcte du type jj/mm/aaaa." js="true"/>'); f.activationDate.focus(); return false; } } f.submit(); } </script> </head> <body style="padding-right: 10px" class="popup_body"> <div id="object_css" style="top:0px;left: 0px;height:100%;"> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L0005\", false, true, \"e-Mailing\") %>" ignoreList="true"> <form action="<fl:link url="/population_email.fl"/>"> <input type="hidden" name="$$presentFields" id="$$presentFields" value=""/> <input type="hidden" name="queued" id="queued" value=""/> <input type="hidden" name="popID" id="popID" value="<%= popID %>"/> <input type="hidden" name="msgID" id="msgID" value="<%= msgID %>"/> <table class="container" cellpadding="0"> <tbody> <tr class="fieldline"> <td class="dataValue"> <% if (!hasToBeQueued) { %> <input type="radio" name="mode" id="immediat1" value="immediat1"/><label for="immediat1"><fl:getMessage code="F6083" alt="Envoi immédiat / Débit maximum"/></label><br> <% } %> <input type="radio" name="mode" id="immediat2" value="immediat2" checked><label for="immediat2"><fl:getMessage code="F6084" alt="Envoi immédiat / Débit régulé"/></label><br> <input type="radio" name="mode" id="differe" value="differe"><label for="differe"><fl:getMessage code="F6085" alt="Envoi différé / Débit régulé"/></label> <label for="activationDate"><fl:getMessage code="L0043" alt="Le"/></label> <input id="activationDate" name="activationDate" value="" size="10" onClick="document.forms[0].mode[<%= hasToBeQueued ? "1" : "2" %>].checked=true" onblur="ctrlDateField(this, '<fl:getMessage code="M202B" alt="Format de date incorrect. Veuillez corriger." js="true"/>');"/> <a href="javascript:openCalendar(document.forms[0].activationDate);" title="<fl:getMessage code="A2000" alt="Afficher le calendrier"/>"><img src="<fl:webapp/>/icons/ico/clock_neutre.gif"></a> <label for="activationTime"><fl:getMessage code="L2059" alt="à"/></label> <input id="activationTime" name="activationTime" value="" size="4" onblur="ctrlHourField(this, '<fl:getMessage code="M202C" alt="Format de l\\\'heure de début incorrect. Veuillez corriger" js="true"/>');"/> </td> </tr> <tr class="ligne_separation"> <td colspan="2"></td> </tr> </tbody> </table> </form> </fl:bigTabs> <BR> <div align="center"> <a href="javascript:doSubmit();"><img src="<fl:link url="/icons/ico/valid_green_long.gif"/>" border="0" alt="<fl:getMessage code="A2001" alt="Valider"/>" title="<fl:getMessage code="A2001" alt="Valider"/>"></a> <a href="#" onclick="self.close();"><img src="<fl:link url="/icons/ico/fermer_red_long.gif"/>" border="0" alt="<fl:getMessage code="L61B1" alt="Fermer la fenêtre"/>" title="<fl:getMessage code="L61B1" alt="Fermer la fenêtre"/>"></a> </div> </div> <div id="waiting" style="display:none"><fl:getMessage code="L639B" alt="Chargement ..."/></div> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de