Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\campaign_calendar\calendar_month_ajax.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" contentType="text/plain" %><%@ page import="com.edeal.frontline.FlContext" %><%@ page import="com.edeal.frontline.DataDictionary" %><%@ page import="com.edeal.frontline.Utils" %><%@ page import="com.edeal.frontline.navigation.FlRequest" %><%@ page import="java.util.Vector" %><%@ page import="java.util.GregorianCalendar" %><%@ page import="java.util.Date" %><%@ page import="javax.servlet.jsp.JspPage" %><%@ page import="javax.servlet.jsp.JspFactory" %><%@ page import="java.util.Hashtable" %><%@ page import="java.util.Calendar" %><%@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(); Vector list = (Vector)flRequest.getAttribute("list"); String pDate = Utils.getRequestParameter(context, request, "date"); GregorianCalendar cal = new GregorianCalendar(); if (pDate != null && !"".equals(pDate)) { cal.setTime(Utils.formatFromWeb(pDate)); } cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); Date begDate = cal.getTime(); %> var _element; <% if (list.size() > 40) { StringBuffer buf = new StringBuffer(); buf.append("<span class=\\\"dataLabel\\\">"); buf.append(Utils.getMessage(session, "L63E6", true, "Trop de résultats. Veuillez limiter votre recherche.")); buf.append("</span>"); %> _element = document.getElementById('errorMessage'); _element.innerHTML = '<%= buf.toString() %>'; _element = document.getElementById('controlRow'); if (_element != null) _element.style.display = 'none'; _element = document.getElementById('campWeekRow'); if (_element != null) _element.style.display = 'none'; _element = document.getElementById('campDayRow'); if (_element != null) _element.style.display = 'none'; <% for (int row = 0; row < 40; ++row) { %> _element = document.getElementById('campRow<%= row %>'); if (_element != null) _element.style.display = 'none'; <% } return; } else { %> _element = document.getElementById('errorMessage'); _element.innerHTML = ''; <% } cal.setTime(begDate); cal.add(Calendar.WEEK_OF_YEAR, -4); %> _element = document.getElementById('campDoubleLeft'); if (_element != null) _element.href= 'javascript:goTo(\'<%= Utils.formatToWebDate(cal.getTime(), false) %>\')'; <% cal.setTime(begDate); cal.add(Calendar.WEEK_OF_YEAR, -1); %> _element = document.getElementById('campLeft'); if (_element != null) _element.href= 'javascript:goTo(\'<%= Utils.formatToWebDate(cal.getTime(), false) %>\')'; <% cal.setTime(begDate); cal.add(Calendar.WEEK_OF_YEAR, 1); %> _element = document.getElementById('campRight'); if (_element != null) _element.href= 'javascript:goTo(\'<%= Utils.formatToWebDate(cal.getTime(), false) %>\')'; <% cal.setTime(begDate); cal.add(Calendar.WEEK_OF_YEAR, 4); %> _element = document.getElementById('campDoubleRight'); if (_element != null) _element.href= 'javascript:goTo(\'<%= Utils.formatToWebDate(cal.getTime(), false) %>\')'; _element = document.getElementById('controlRow'); if (_element != null) _element.style.display = ''; <% cal.setTime(begDate); for (int cnt = 0; cnt < 5; ++cnt) { String begWeek = Utils.formatToWebDate(cal.getTime(), true); cal.add(Calendar.DAY_OF_YEAR, 6); String endWeek = Utils.formatToWebDate(cal.getTime(), true); %> _element = document.getElementById('week<%= cnt %>Title'); _element.innerHTML = '<div class=\"weekTextDiv\"><span><fl:getMessage code="L3026" alt="Semaine du" js="true"/><br> <%= Utils.formatToJavascript(begWeek) %> <fl:getMessage code="L3127" alt="au" js="true"/> <%= Utils.formatToJavascript(endWeek) %> </span></div>'; <% cal.add(Calendar.DAY_OF_YEAR, 1); } %> _element = document.getElementById('campWeekRow'); if (_element != null) _element.style.display = ''; _element = document.getElementById('campDayRow'); if (_element != null) _element.style.display = ''; <% int rowCount = list.size(); for (int row = 0; row < rowCount; row++) { Hashtable rowHT = (Hashtable)list.elementAt(row); String stgID = (String)rowHT.get("StgID"); String stgCode = (String)rowHT.get("StgCode"); String cpgID = (String)rowHT.get("StgCpgID"); String cpgCode = (String)rowHT.get("StgCpgID:CpgCode"); Date stgDateBeg = (Date)rowHT.get("StgDateBeg"); Date stgDateEnd = (Date)rowHT.get("StgDateEnd"); GregorianCalendar begCal = new GregorianCalendar(); begCal.setTime(stgDateBeg); GregorianCalendar endCal = new GregorianCalendar(); endCal.setTime(stgDateEnd); String rowClass = (row % 2 == 1) ? "tabSimpleFdBleu" : "tabSimpleFdBlanc"; StringBuffer htmlString = new StringBuffer("<div class=\"campRowTitle\"><span>"); htmlString.append("<a href=\"" + flRequest.computeURL("/read_campaign.fl?id=" + cpgID) + "\" target=\"_blank\">" + Utils.formatToWeb(cpgCode, false) + "</a>"); htmlString.append(" - "); htmlString.append("<a href=\"" + flRequest.computeURL("/read_stage.fl?id=" + stgID) + "\" target=\"detail\">" + Utils.formatToWeb(stgCode, false) + "</a>"); htmlString.append("</span></div>"); %> _element = document.getElementById('campRow<%= row %>Link'); if (_element != null) { _element.className = 'campLink'; _element.innerHTML = '<%= Utils.formatToJavascript(htmlString.toString()) %>'; } <% cal.setTime(begDate); for (int col = 0; col < 40; ++col) { %> _element = document.getElementById('campRow<%= row %>Day<%= col %>'); if (_element != null) { <% if (cal.get(Calendar.DAY_OF_YEAR) >= begCal.get(Calendar.DAY_OF_YEAR) && cal.get(Calendar.DAY_OF_YEAR) <= endCal.get(Calendar.DAY_OF_YEAR)) { %> _element.className = '<%= rowClass + " marked" %>'; <% } else { %> _element.className = '<%= rowClass %>'; <% } %> } <% cal.add(Calendar.DAY_OF_YEAR, 1); } %> _element = document.getElementById('campRow<%= row %>'); if (_element != null) _element.style.display = ''; <% } for (int cnt = rowCount; cnt < 40; ++cnt) { %> _element = document.getElementById('campRow<%= cnt %>'); if (_element != null) _element.style.display = 'none'; <% } %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de