Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\netbusiness\emailing\edit.jsp
<%@page import="com.edeal.frontline.navigation.WebUtils"%><% /****************************************************************************** * Copyright (c) 2000-2005 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="java.net.URLEncoder"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.SilhouetteBean" %> <%@ page import="com.edeal.frontline.PersonBean" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.controller.actions.SelectAction" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.EMailingBean" id="EMailing" scope="request"/> <% 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 id = null; String strActID = (String)session.getAttribute("actorID"); try { id = EMailing.getID(); } catch (FieldNotInitializedException fnie) { } String[] ctlFields = {"CivID:Val", "FstName", "Name"}; int typePopulationIndex = 0; int typeNewsLetterIndex = 0; Vector vectRefPop = dico.getRefCodeList("EmaPopTypID"); for(int i = 0; i < vectRefPop.size(); i++) { Vector vectRow = (Vector)vectRefPop.elementAt(i); if("POPULATION".equals((String)vectRow.elementAt(1))) { typePopulationIndex = i; } else if("NEWSLETTER".equals((String)vectRow.elementAt(1))) { typeNewsLetterIndex = i; } } String htmlMsgRefID = dico.getRefIdByCode("MsgCtyID", "TEXT/HTML"); String textMsgRefID = dico.getRefIdByCode("MsgCtyID", "TEXT/PLAIN"); String htmlMsgQuery = "MsgCode = null" + (htmlMsgRefID == null ? "|MsgCtyID <> null" : "|MsgCtyID=" + Utils.formatToSQL(context, htmlMsgRefID)); String textMsgQuery = "MsgCode = null" + (textMsgRefID == null ? "|MsgCtyID <> null" : "|MsgCtyID=" + Utils.formatToSQL(context, textMsgRefID)); htmlMsgQuery = WebUtils.urlEncode(context, htmlMsgQuery); textMsgQuery = WebUtils.urlEncode(context, textMsgQuery); String emaStateID; try { emaStateID = EMailing.getEmaStateID(); } catch (FieldNotInitializedException e) { emaStateID = ""; } %> <script language="javascript"> function doCheckDate() { var f = document.forms[0]; if(f.Date$EmaDate.value && !f.Time$EmaDate.value) { f.Time$EmaDate.value = '00:00'; } return true; } function doSubmit(){ var f = document.forms[0]; if (f.lblEmaSenderID.value != '' && f.EmaSenderID.value == ''){ f.EmaSender.value = f.lblEmaSenderID.value; } if (f.lblEmaReplyToID.value != '' && f.EmaReplyToID.value == ''){ f.EmaReplyTo.value = f.lblEmaReplyToID.value; } if(f.lblEmaSenderID.value == '') { window.alert('<fl:getMessage code="M3018" alt="Veuillez spécifier un émetteur." js="true"/>'); f.lblEmaSenderID.focus(); submitFlag = false; return; } else if(!f.EmaPopTypID[0].checked && !f.EmaPopTypID[1].checked) { window.alert('<fl:getMessage code="M0000" alt="Veuillez spécifier un type de destinataire." js="true"/>'); f.EmaPopTypID[0].focus(); submitFlag = false; return; } else if(f.EmaHtmlMsgID.value =='' && f.EmaTextMsgID.value =='') { window.alert('<fl:getMessage code="M6034" alt="Veuillez saisir un message." js="true"/>'); submitFlag = false; return; } if(!f.EmaPopTypID[0].checked && !f.EmaPopTypID[1].checked) { window.alert('<fl:getMessage code="M0000" alt="Veuillez spécifier un type de destinataire." js="true"/>'); f.EmaPopTypID[0].focus(); return; } else if(f.EmaPopTypID[<%= typePopulationIndex %>].checked && f.lblEmaPopID.value == '') { window.alert('<fl:getMessage code="M0001" alt="Veuillez sélectionner une population." js="true"/>'); return; } else if(f.EmaPopTypID[<%= typeNewsLetterIndex %>].checked && !doCheckFieldArray(f.EmaNltID)) { window.alert('<fl:getMessage code="M0002" alt="Veuillez sélectionner un ou plusieurs thèmes de news letter." js="true"/>'); f.EmaNltID[0].focus(); return; } else if(!doCheckDate()) { submitFlag = false; return; } return true; } </script> <fl:form action="/save_emailing.fl" bean="EMailing"> <input type="hidden" name="EmaStateID" value="<%= emaStateID %>"> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L643E\", false, true, \"Fiche Emailing\") %>" ou="<%= \"/edit_silhouette.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0"> <tr> <td colspan="3"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="labelTitreFiche"> <fl:label field="EmaName" labelClassName="titreFiche"/> </td> <td class="fieldTitreFiche"> <fl:input property="EmaName" mandatoryMsgCode="M0004" /> </td> </tr> </table> </td> </tr> <tr><td colspan="3" class="ligne_separation"/></tr> <tr> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldEdit property="EmaDate" mandatoryMsgCode="M2006"/> <fl:fieldEdit property="EmaHtmlMsgID" mandatoryMsgCode="M6034" query="<%= WebUtils.urlEncode(context,htmlMsgQuery) %>"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:label code="F0005"/></td> <td class="dataValue"> <div class="fieldTable" > <table class="fieldTable" cellpadding="0"> <tr> <td class="principalText"> <input id="EmaSender" name="EmaSender" type="hidden" value="<fl:getProperty name="EMailing" property="EmaSender" alt=""/>"> <input id="EmaSenderID" name="EmaSenderID" type="hidden" value="<fl:getProperty name="EMailing" property="EmaSenderID" alt=""/>"> <input class="input fob chpsTextObligatoire" id="lblEmaSenderID" name="lblEmaSenderID" type="text" value="<% try { EMailing.getEmaSender(); %><fl:getProperty name="EMailing" property="EmaSender" alt="" edit="true"/><% } catch (FieldNotInitializedException ex) { %><fl:getProperty name="EMailing" property="EmaSenderID" alt="" edit="true" bean="true"/><% } %>" class="chpsTextObligatoire"> </td> <td class="postText"> <a href="javascript:var win = window.open('<fl:webapp/>/select.fl?type=Actor&field=EmaSenderID&formIndex=0', 'SelectActor', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=<%= SelectAction.SELECT_WINDOW_WIDTH %>,height=350')"> <img src="<fl:webapp/>/icons/ico/rechercher.gif" align="middle" border="0" width="17" height="17" alt="Sélectionner"> </a> </td> <td class="postText"> <a href="javascript:var f = window.document.forms[0]; f.EmaSenderID.value = f.lblEmaSenderID.value = f.EmaSender.value = ''; void('')"> <img src="<fl:webapp/>/icons/ico/supprimer.gif" align="middle" border="0" width="17" height="17" alt="Vider le champ"> </a> </td> </tr> </table> </div> </td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:label code="F0006"/></td> <td class="dataValue" id="EmaReplyToID_value"> <div class="fieldTable" > <table class="fieldTable" cellpadding="0"> <tr> <td class="principalText"> <input id="EmaReplyTo" name="EmaReplyTo" type="hidden" value="<fl:getProperty name="EMailing" property="EmaReplyTo" alt=""/>"> <input id="EmaReplyToID" name="EmaReplyToID" type="hidden" value="<fl:getProperty name="EMailing" property="EmaReplyToID" alt=""/>"> <input class="input fob" id="lblEmaReplyToID" name="lblEmaReplyToID" type="text" value="<% try { EMailing.getEmaReplyTo(); %><fl:getProperty name="EMailing" property="EmaReplyTo" alt="" edit="true"/><% } catch (FieldNotInitializedException ex) { %><fl:getProperty name="EMailing" property="EmaReplyToID" alt="" edit="true" bean="true"/><% } %>"> </td> <td class="postText"> <a href="javascript:var win = window.open('<fl:webapp/>/select.fl?type=Actor&field=EmaReplyToID&formIndex=0', 'SelectActor', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=<%= SelectAction.SELECT_WINDOW_WIDTH %>,height=350')"> <img src="<fl:webapp/>/icons/ico/rechercher.gif" align="middle" border="0" width="17" height="17" alt="Sélectionner"> </a> </td> <td class="postText"> <a href="javascript:var f = window.document.forms[0]; f.EmaReplyToID.value = f.lblEmaReplyToID.value = f.EmaReplyTo.value = ''; void('')"> <img src="<fl:webapp/>/icons/ico/supprimer.gif" align="middle" border="0" width="17" height="17" alt="Vider le champ"> </a> </td> </tr> </table> </div> </td> </tr> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> </table> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="EMATabs"> <fl:sTab id="DESTINA" title="<%= Utils.getMessage(session, \"L0006\", \"Destinataires\") %>"> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"> <fl:label code="F0009"/> <a href="javascript:selectCtl('Html')"><img src="<fl:webapp/>/icons/ico/rechercher.gif" alt="<fl:getMessage code="A2003" alt="sélectionner"/>" border="0" width="17" height="17"></a> <a href="javascript:selectCtlNone('Html')"><img src="<fl:webapp/>/icons/ico/supprimer.gif" alt="<fl:getMessage code="A0006" alt="réinitialiser"/>" border="0" width="17" height="17"></a> </td> <td class="dataValue"> <div class="fieldTable" > <table class="fieldTable" cellpadding="0"> <tr> <td class="principalText"> <div class="input select"><select name="lblEmaHtmlCtlGrpID" multiple class="input select" onfocus="eval(this.form.evalEmaHtmlCtlGrpID.value); this.form.evalEmaHtmlCtlGrpID.value = '';"> <% try { Vector vectID = EMailing.getEmaHtmlCtlGrpID(); for(int i = 0; i < vectID.size(); i++) { Vector usr = Utils.explodeList((String)vectID.elementAt(i), ":"); String usrID = (String)usr.elementAt(0); String usrType = (String)usr.elementAt(1); boolean isPerson = "Person".equals(usrType); String per =null; String sil =null; if(isPerson){ per = (new PersonBean(usrID,context)).toString(); }else{ sil = (new SilhouetteBean(usrID,context)).toString(); } String usrName = isPerson ? per : sil; %> <option value="<%= usrID + ":" + usrType %>"><%= Utils.formatToWeb(usrName, false) %></option><% } } catch (Exception ex) { } %> </select></div> <input id="EmaHtmlCtlGrpID" name="EmaHtmlCtlGrpID" type="hidden" value="<fl:getProperty name="EMailing" property="EmaHtmlCtlGrpID" alt="" separator="|"/>"> <input name="evalEmaHtmlCtlGrpID" type="hidden" value=""> </td> </tr> </table> </div> </td> </tr> <fl:fieldEdit property="EmaPopTypID" type="buttons"/> <fl:fieldEdit property="EmaPopID"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldEdit property="EmaNltID" type="buttons" separator="<br>"/> </table> </td> </tr> </table> </fl:sTab> <fl:sTab id="PARAM" title="<%= Utils.getMessage(session, \"LF033\", \"Paramètres de connexion\") %>"> <fl:autodisplay name="EMailing" zone="Emailing parameters write" edit="true"/> </fl:sTab> </fl:smallTabs> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de