Edit C:\galaxie\Back\galaxie\netbusiness\emailing\read.jsp
<% /****************************************************************************** * 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 session="true"%> <%@ 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.Hashtable" %> <%@ page import="com.edeal.frontline.SilhouetteBean" %> <%@ page import="com.edeal.frontline.PersonBean" %> <%@ page import="java.util.Vector" %> <%@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 SfwID = flRequest.getRequestParameterOrAttribute("SfwID"); String id = null; try { id = EMailing.getID(); } catch (FieldNotInitializedException e) { } String[] ctlFields = {"CivID:Val", "FstName", "Name", "Mail"}; boolean showDate = false; try { EMailing.getEmaSentDate(); showDate = true; } catch (FieldNotInitializedException e) { } %> <!-- Javascript include --> <script language="javascript"> function displayMessage(id){ window.open('<fl:webapp/>/quickview_messages.fl?id=' + id, 'Message', 'width=400,height=400,scrollbars,resizable'); } </script> <fl:bigTabs listTitle="<%= Utils.getMessage(session, \"L649E\", false, true, \"liste des e-mailings\") %>" objectTitle="<%= Utils.getMessage(session, \"L643E\", false, true, \"Fiche Emailing\") %>" ou="<%= \"/read_emailing.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0"> <tr> <td colspan="3" class="titreFiche"><fl:getProperty name="EMailing" property="EmaName" alt="" /></td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> <tr> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldRead property="EmaDate"/> <tr class="fieldline"> <td id="EmaTextMsgID_label" class="dataLabel"> <fl:label code="F0007"/> </td> <td id="EmaTextMsgID_value" class="dataValue"> <a href="javascript:displayMessage('<fl:getProperty name="EMailing" property="EmaHtmlMsgID" alt=""/>')"><fl:getProperty name="EMailing" property="EmaHtmlMsgID" alt=" " bean="true"/></a> </td> </tr> <fl:fieldRead property="EmaStateID"/> <% if (showDate) { %> <fl:fieldRead property="EmaSentDate"/> <% } %> </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"> <% try { EMailing.getEmaSender(); %><a href="mailto:<fl:getProperty name="EMailing" property="EmaSender" alt=""/>"><fl:getProperty name="EMailing" property="EmaSender" alt=" "/></a><% } catch (FieldNotInitializedException ex) { %><fl:getProperty name="EMailing" property="EmaSenderID" alt=" " bean="true" href="true" disp="read_actor.fl"/><% } %> </td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:label code="F0006"/></td> <td class="dataValue" id="EmaReplyToID_value"> <% try { EMailing.getEmaReplyTo(); %><a href="mailto:<fl:getProperty name="EMailing" property="EmaReplyTo" alt=""/>"><fl:getProperty name="EMailing" property="EmaReplyTo" alt=" "/></a><% } catch (FieldNotInitializedException ex) { %><fl:getProperty name="EMailing" property="EmaReplyToID" alt=" " bean="true" href="true" disp="read_actor.fl"/><% } %> </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"/></td> <td class="dataValue"> <% 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); String usrName = ""; boolean isPerson = "Person".equals(usrType); String radical = isPerson ? "Per" : "Sil"; String[] fields = new String[ctlFields.length]; for(int j = 0; j < ctlFields.length; j++) { fields[j] = radical + ctlFields[j]; } String[][] query = {{radical + "ID = " + Utils.formatToSQL(context, usrID)}}; Hashtable usrVal = (Hashtable)(isPerson ? PersonBean.listSummary(session, fields, query, 0, 1) : SilhouetteBean.listSummary(session, fields, query, 0, 1)).firstElement(); for(int j = 0; j < fields.length - 1; j++) { usrName += (usrVal.get(fields[j]) == null ? "" : (String)usrVal.get(fields[j]) + " "); } usrName = usrName.trim(); if(usrName.equals("")) { usrName = (String)usrVal.get(fields[fields.length - 1]); } else { String usrMail = (String)usrVal.get(fields[fields.length - 1]); if(usrMail != null) { usrName += " <" + usrMail + ">"; } } String strLink = ""; if (isPerson){ strLink = "/read_person.fl?id="+usrID; }else { strLink = "/read_silhouette.fl?id="+usrID; } %> <a href="<fl:webapp/><%= strLink%>"><%= Utils.formatToWeb(usrName, false) %><br> <% } } catch (Exception ex) { } %> </td> </tr> <fl:fieldRead property="EmaPopTypID"/> <fl:fieldRead property="EmaPopID" bean="true" href="true" disp="<%=\"/read_populationv2.fl?SfwID=\"+ SfwID %>"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldRead property="EmaNltID" 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 read"/> </fl:sTab> <fl:sTab id="STAT" title="<%=Utils.getMessage(session, \"L60FE\", \"Statistiques\")%>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="column2"> <table class="container" cellpadding="0"> <% String fldsql = "EmaNbStatus"; String statusEmsCode = null; Vector statusEmsLibele = new Vector(7); for ( int i=-1; i<6 ;i++){ statusEmsCode = "ST" + i; //logger.info("StatusCode :!!!!!!!!!!!" + statusEmsCode); try { statusEmsLibele.addElement((String) dico.getRefDisp(session, "Ste" , "Te1" , dico.getRefIdByCode("Ste", "Te1", statusEmsCode))); } catch (Exception ex) {} //logger.info("Status libelé :!!!!!!!!!!!!!" + statusEmsLibele.get(i+1)); if (i == -1){ String store=(String)statusEmsLibele.get(i+1); %> <tr class="fieldline"> <th id="EmaNbToSend_label" class="dataLabel"><div><label for="EmaNbToSend" title="<%= statusEmsLibele.get(i+1)%>"><%= statusEmsLibele.get(i+1)%></label></div></td> <td id="EmaNbToSend_value" class="dataValue"><div title="<fl:getProperty name="EMailing" property="EmaNbToSend" alt="0"/>"><fl:getProperty name="EMailing" property="EmaNbToSend" alt="0"/></div></td> </tr> <%}else {%> <tr class="fieldline"> <th id="EmaNbToSend_label" class="dataLabel"><div><label for="EmaNbToSend" title="<%= statusEmsLibele.get(i+1)%>"><%= statusEmsLibele.get(i+1)%></label></div></td> <td id="EmaNbToSend_value" class="dataValue"><div title="<fl:getProperty name="EMailing" property="<%= fldsql + i %>" alt="0"/>"><fl:getProperty name="EMailing" property="<%= fldsql + i %>" alt="0"/></div></td> </tr> <% } } %> </TABLE> </td> </tr> </table> </fl:sTab> </fl:smallTabs> </fl:bigTabs>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de