<% /****************************************************************************** * 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" import="com.edeal.frontline.*, com.edeal.frontline.navigation.*,java.util.*"%> <%@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 solObjID = null; try { ObjectsBean solObj = dico.getTable("sql", "Solicitation"); solObjID = solObj.getID(); } catch (FrontlineException e) { } String[] fields = {"MsgID", "MsgSubject", "MsgCtyID:RefVal", "MsgCode"}; String[][] query = {{"MsgCode like " + Utils.formatToSQL(context, "SOL%")}}; String[] orderBy = {"MsgCode"}; Vector vectMsg = MessagesBean.listSummary(context, fields, query, orderBy); Hashtable hashMsg = new Hashtable(); if(vectMsg != null && vectMsg.size() > 0) { for(int i = 0; i < vectMsg.size(); i++) { Hashtable row = (Hashtable)vectMsg.elementAt(i); String msgCode = (String)row.get("MsgCode"); String msgCtyVal = (String)row.get("MsgCtyID:RefVal"); if(msgCode != null && msgCtyVal != null) { if("TEXT/PLAIN".equalsIgnoreCase(msgCtyVal)) { hashMsg.put(msgCode + "TEXT/PLAIN", row); } else { hashMsg.put(msgCode + "TEXT/HTML", row); } } } } String[][] msgType = {{"SOL1", Utils.getMessage(session, "L62D9", "Notification acteur"), Utils.getMessage(session, "L0052", "Acteur texte"), Utils.getMessage(session, "L0053", "Acteur html"),"Acteur texte","Acteur html"}, {"SOL2", Utils.getMessage(session, "L62DA", "Notification solliciteur"), Utils.getMessage(session, "F6135", "Solliciteur texte"), Utils.getMessage(session, "F6137", "Solliciteur html"),"Solliciteur texte","Solliciteur html"}}; %> "> <%for(int i = 0; i < msgType.length; i++) { if(i==1){ %> <% } %> <% }%>
<% Hashtable row = (Hashtable)hashMsg.get(msgType[i][0] + "TEXT/PLAIN"); if(row == null) { %> <% } else { %> <% String subject =""; subject = (String) row.get("MsgSubject"); %> <% } %> <% row = (Hashtable)hashMsg.get(msgType[i][0] + "TEXT/HTML"); if(row == null) { %> <% } else { %> <% String subject =""; subject = (String) row.get("MsgSubject"); %> <% } %>
 
<fl:getMessage code=" border="0" width="15" height="15">    
">
<%= subject%>
');"><fl:getMessage code=" border="0" width="15" height="15">     ')"><fl:getMessage code=" border="0" width="17" height="17">
 
<fl:getMessage code=" border="0" width="17" height="17">   <fl:getMessage code=" border="0" width="17" height="17">  
">
<%= subject%>
<% if("MIME".equalsIgnoreCase((String)row.get("MsgCtyID:RefVal"))) { %><% } else { %>');"><fl:getMessage code=" border="0" width="15" height="15"><% } %>     ')"><fl:getMessage code=" border="0" width="17" height="17">
<% String id = null; try { id = Messages.getID(); } catch (FieldNotInitializedException fnie) { } String pCode = flRequest.getParameter("code"); String pCty = flRequest.getParameter("cty"); String pNext = flRequest.getParameter("next"); String pTarget = flRequest.getParameter("target"); //String pObject = flRequest.getParameter("object"); String msgBody = flRequest.getParameter("msgBody"); MessagesBean obj = (MessagesBean)request.getAttribute("Messages"); if (pCode!=null){ obj.setMsgCode(pCode); } if (pCty!=null){ obj.setMsgCty(pCty); } String objTableID = null; try{ objTableID = obj.getMsgObjID(); }catch(FieldNotInitializedException fnie){} String typeID = null; try{ typeID = obj.getMsgCtyID(); }catch(FieldNotInitializedException fnie){ try{ typeID = dico.getRefIdByCode("MsgCtyID", pCty); }catch(FrontlineException fe){ typeID=""; } } if (typeID!=null){ obj.setMsgCtyID(typeID); } String[] objFields = { "ObjID", "ObjDisplay", "ObjSql" }; String[][] objQuery = {{ "ObjSql in (" + Utils.formatToSQL(context, "Person") + ", " + Utils.formatToSQL(context, "Solicitation") + ", " + Utils.formatToSQL(context, "Journalist") + ", " + Utils.formatToSQL(context, "Silhouette") + ", " + Utils.formatToSQL(context, "Actor") + ")" }}; String[] objOrderBy = { "ObjDisplay" }; Vector objList; try { objList = ObjectsBean.listSummary(session, objFields, objQuery, objOrderBy); } catch (FrontlineException e) { objList = new Vector(); } %> <%if ("true".equals(msgBody)){%>
"> "> " >
<% if (objList != null && objList.size() > 0) { %> <% } %>
<%}%>