Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\campaign_calendar\map.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" import="com.edeal.frontline.*,java.util.*,java.text.*,javax.xml.parsers.DocumentBuilderFactory,java.io.*,org.jdom.*,org.jdom.output.*"%><%@ page import="com.edeal.frontline.navigation.FlRequest" %><%@ page import="com.edeal.frontline.navigation.WebUtils" %><%@ page import="java.util.Vector" %><%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %><% response.setContentType("text/xml");String prolog="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";String data="<data>";%><%= prolog%><%= data%><% 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 dateBeg = (String) flRequest.getSearchCriteria("CpgDateBeg"); String dateEnd = (String) flRequest.getSearchCriteria("CpgDateEnd"); String CpgID = (String) flRequest.getSearchCriteria("CpgID"); String CpgDept = (String) flRequest.getSearchCriteria("CpgDept"); String entite = (String) flRequest.getSearchCriteria("CpgEnt"); String sfwId = (String) flRequest.getRequestParameterOrAttribute("SfwID"); Vector vectQuery = new Vector(); if (entite !=null && !"".equals(entite)) vectQuery.addElement(new String[]{"CpgEnt = " + Utils.formatToSQL(context, entite)}); if (CpgDept !=null && !"".equals(CpgDept)) vectQuery.addElement(new String[]{"CpgDept = " + Utils.formatToSQL(context, CpgDept)}); if (CpgID !=null && !"".equals(CpgID)) vectQuery.addElement(new String[]{"CpgID = " + Utils.formatToSQL(context, CpgID)}); if (dateBeg !=null && !"".equals(dateBeg)) vectQuery.addElement(new String[]{"CpgDateBeg >= " + Utils.formatToSQL(context, dateBeg)}); if (dateEnd !=null && !"".equals(dateEnd)) vectQuery.addElement(new String[]{"CpgDateEnd <= " + Utils.formatToSQL(context, dateEnd)}); String[] fields = {"CpgID", "CpgTitle", "CpgDateBeg", "CpgDateEnd", "CpgAim", "CpgTarget", "CpgMeans"}; String[] ordeyBy = {"CpgDateBeg"}; Vector list = new Vector(); if (vectQuery.size() > 0) { String[][] query = (String[][])vectQuery.toArray(new String[vectQuery.size()][]); list = CampaignBean.listSummary(session, fields, query,ordeyBy,true); }else { list = CampaignBean.listSummary(session, fields,ordeyBy); } logger.info("list timeline 2 is "+list); String ctx=context.getContextName(); String vide="-"; String br = "<br>"; String bold = "<b>"; String endBold = "</b>"; Vector vectCtl = dico.getRefCodeList("Ctl","Te1",false); Vector vectCtlv = dico.getRefCodeList("Ctl","Te2",false); if (list != null && list.size() > 0) { for (int i = 0; i < list.size(); i++) { Hashtable row = (Hashtable)list.elementAt(i); String cpgID = (String)row.get("CpgID"); String cpgTitle = (String) row.get("CpgTitle"); Date cpgDateBeg =(Date) row.get("CpgDateBeg"); Date cpgDateEnd =(Date)row.get("CpgDateEnd"); String aim = (String) row.get("CpgAim"); String target = (String) row.get("CpgTarget"); String means = (String) row.get("CpgMeans"); // Replace XML sensitive chars (it seems that CDATA doesn't work) aim = Utils.replace(aim, "<", "<"); target = Utils.replace(target, "<", "<"); means = Utils.replace(means, "<", "<"); aim = Utils.replace(aim, ">", ">"); target = Utils.replace(target, ">", ">"); means = Utils.replace(means, ">", ">"); aim = Utils.replace(aim, "&", "&"); target = Utils.replace(target, "&", "&"); means = Utils.replace(means, "&", "&"); // Have to respect newlines aim = Utils.replace(aim, "\r\n", br); target = Utils.replace(target, "\r\n", br); means = Utils.replace(means, "\r\n", br); aim = Utils.replace(aim, "\n", br); target = Utils.replace(target, "\n", br); means = Utils.replace(means, "\n", br); String cTitle=""; String contenu=""; if ((cpgDateBeg !=null) &&(cpgDateEnd !=null)){ Vector curCtlv = (Vector) vectCtlv.elementAt(i % vectCtlv.size()); String curCtlIDv = (String) curCtlv.elementAt(0); String str = (String) dico.getRefDisp("Ctl","Te2",curCtlIDv); if (cpgTitle != null) { cTitle=vide+cpgTitle; cTitle = Utils.formatToWeb(cTitle, false); String titre="<a href=\""+ctx+"/read_campaign.fl?id="+cpgID+"&SfwID="+sfwId+"\" "+ " target=\"_parent\"> " +cpgTitle+"</a>"; contenu=""; contenu+=titre; contenu+=br; if (aim != null) { contenu+= bold + Utils.getMessage(session, "F2005", "Objectifs") + endBold; contenu+=" :"+aim; } if (target != null){ contenu+=br; contenu+= bold + Utils.getMessage(session, "F2006", "Cible") + endBold; contenu+=" :"+target; } if (means != null){ contenu+=br; contenu+= bold + Utils.getMessage(session, "F2007", "Moyens") + endBold; contenu+=" :"+means; } int year=cpgDateBeg.getYear()+1900; int month=cpgDateBeg.getMonth()+1; int day=cpgDateBeg.getDate(); int year1=cpgDateEnd.getYear()+1900; int month1=cpgDateEnd.getMonth()+1; int day1=cpgDateEnd.getDate(); contenu+=br; contenu+=bold + Utils.getMessage(session, "", "Date debut") + endBold; contenu+=" : "+day+"/"+month+"/"+year; contenu+=br; contenu+= bold + Utils.getMessage(session, "F2003", "Date fin") + endBold; contenu+=" : "+day1+"/"+month1+"/"+year1; } %> <event start="<%= cpgDateBeg.toGMTString()%>" end="<%=cpgDateEnd.toGMTString()%>" isDuration="true" color="<%=str%>" title="<%= cTitle%>" ><%=contenu%></event> <% if (cpgID !=null){ String[] fieldStg = {"StgID","StgDateBeg", "StgDateEnd", "StgTitle","StgEvtID","StgEvtID:EvtDate","StgEvtID:EvtEndDate","StgEvtID:EvtLabel", "StgDescr"}; String[][] query1 = {{"StgCpgID = " + Utils.formatToSQL(context,cpgID)}}; Vector vstage = StageBean.listSummary(context, fieldStg, query1); if (vstage != null && vstage.size() > 0) { for (int j = 0; j < vstage.size(); j++) { Hashtable row1 = (Hashtable)vstage.elementAt(j); String stgID = (String)row1.get("StgID"); String stgTitle = (String) row1.get("StgTitle"); String EvID= (String) row1.get("StgEvtID"); Date stgDateBeg =(Date) row1.get("StgDateBeg"); Date stgDateEnd =(Date) row1.get("StgDateEnd"); String desc = (String) row1.get("StgDescr"); String contenu1=""; String strv = null; if ((stgDateBeg !=null)&&(stgDateEnd !=null)){ curCtlv = (Vector) vectCtlv.elementAt(i % vectCtlv.size()); curCtlIDv = (String) curCtlv.elementAt(0); strv = (String) dico.getRefDisp("Ctl","Te2",curCtlIDv); if (stgTitle !=null){ String titre="<a href=\""+ctx+"/read_stage.fl?id="+stgID+"&SfwID="+sfwId+"\" "+ " target=\"_parent\"> " +Utils.formatToJavascript(stgTitle)+"</a>"; contenu1+=titre; contenu1+=br; if (desc != null){ contenu1+=Utils.getMessage(session, "L2007", "Description"); contenu1+=" : "+desc; contenu1+=br; int year=stgDateBeg.getYear()+1900; int month=stgDateBeg.getMonth()+1; int day=stgDateBeg.getDate(); int year1=stgDateEnd.getYear()+1900; int month1=stgDateEnd.getMonth()+1; int day1=stgDateEnd.getDate(); contenu1+=Utils.getMessage(session, "", "Date debut"); contenu1+=" : "+day+"/"+month+"/"+year; contenu1+=br; contenu1+=Utils.getMessage(session, "F2003", "Date fin"); contenu1+=" : "+day1+"/"+month1+"/"+year1; } } %><event start="<%=stgDateBeg.toGMTString()%>" end="<%=stgDateEnd.toGMTString()%>" isDuration="true" color="<%=strv%>" title="<%= vide+ Utils.formatToJavascript(stgTitle )%>"><%=contenu1%></event> <% } String EventID = (String) row1.get("StgEvtID"); String Elabel = (String) row1.get("StgEvtID:EvtLabel"); Date Edate= (Date) row1.get("StgEvtID:EvtDate"); Date EdateEnd = (Date) row1.get("StgEvtID:EvtEndDate"); String titre=""; if (Edate !=null){ if (Elabel != null){ titre="<a href=\""+ctx+"/read_event.fl?id="+EventID+"&SfwID="+sfwId+"\" "+ " target=\"_parent\"> " +Elabel+"</a>"; } %><event start="<%=Edate.toGMTString()%>" <%= EdateEnd != null ? "end=\"" + EdateEnd.toGMTString() + " \" isDuration=\"true\" " : "" %> title="<%=Elabel%>"><%=titre%></event> <% } }// fin evid } } } } } %> </data>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de