<%@page import="com.edeal.frontline.FormBean"%> <%@page import="com.edeal.frontline.FrontlineException"%> <%@page import="java.util.Collection"%> <%@page import="com.edeal.frontline.helper.custom.PersonEventHelper"%> <%@page import="com.edeal.frontline.helper.EventBaseHelper"%> <%@page import="com.edeal.frontline.helper.custom.EventHelper"%> <%@page import="java.util.ArrayList"%> <% /****************************************************************************** * Copyright (c) 2000-2012 E-DEAL * * E-DEAL S.A. * 41, rue Périer * 92120 Montrouge * France * * T: +33 (0)1 73 03 29 80 * 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="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.WebOperationBean" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="java.util.Hashtable" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.Calendar" %> <%@ page import="java.util.Date" %> <%@ page import="java.text.DecimalFormat" %> <%@ page import="com.edeal.frontline.SalesInvestBean" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.helper.EventBaseHelper.EventCategory" %> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <% //http://u-project2.umanis.com/view.php?id=45257 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; try { id = Event.getID(); } catch (FieldNotInitializedException e) { } boolean isSalesInvest = false; try { isSalesInvest = Event.isEvtIsSalesInvest(); } catch (FieldNotInitializedException e) { } String evtCity = null; try { evtCity = Event.getEvtCity(); } catch (FieldNotInitializedException e){ } String evtZip = null; try { evtZip = Event.getEvtZip(); } catch (FieldNotInitializedException e) { } String eventCategoryID = null; try { eventCategoryID = Event.getEvtCategory(); } catch (FieldNotInitializedException e) { } String eventCategory = null; try { eventCategory = (String) dico.getRefDisp("Ect", "Te2", eventCategoryID); } catch (Exception e) { } boolean isActiveSalesInvest = SalesInvestBean.isSalesInvestActive(context); Vector formList = (Vector)flRequest.getAttribute("formList"); Vector scriptList = (Vector)flRequest.getAttribute("scriptList"); String formID = null; String typeFrm = null; Date finDispoFrm =null; if (formList == null) { formList = new Vector(); }else{ if(formList.size()>0){ Hashtable row = (Hashtable)formList.elementAt(0); formID = (String)row.get("FrmID"); try{ typeFrm = (String)FormBean.lookup(context, "FrmTypID_:RefVal", formID); finDispoFrm = (Date)FormBean.lookup(context, "FrmAvailableToDt", formID); }catch(FrontlineException e){ } } } Date currentDate = new Date(); String listName = "EVTQSTNAT"; //pour les natif autre que guide / stat if(typeFrm!=null && !typeFrm.isEmpty()){ if("FRMGUIDE".equals(typeFrm)){ if(finDispoFrm.before(currentDate)) listName = "EVTQSTCSTV"; else listName = "EVTQSTCST"; } else if ("FRMSTAT".equals(typeFrm)){ listName = "EVTQSTSTAT"; } else if ("FRMMARCHE".equals(typeFrm)){ //if(finDispoFrm.before(currentDate)) listName = "EVTQSTMM"; //else //listName = "EVTQSTCSTV"; } } Date evtEndDate = null; Date evtDate = null; try { evtEndDate = (Date) Event.lookup(context, "EvtEndDate", id); evtDate = (Date) Event.lookup(context, "EvtDate", id); } catch (FieldNotInitializedException fnie) { } boolean canValidate = false; if (evtDate != null && evtEndDate != null) { long currentDayMillis = currentDate.getTime(); long evtDateMillis = evtDate.getTime(); long evtEndDateMillis = evtEndDate.getTime(); if (currentDayMillis >= evtDateMillis && currentDayMillis <= evtEndDateMillis) { canValidate = true; } } if (scriptList == null) { scriptList = new Vector(); } DecimalFormat df = FlLocale.getInstance(session).getDecimalFormat("#,##0.##"); DecimalFormat df2 = FlLocale.getInstance(session).getDecimalFormat("0000"); Vector eventActors = null; try { eventActors = Event.getEvtActors(); } catch (FieldNotInitializedException e) { } int evtQuota = 0; try { evtQuota = Event.getEvtQuota(); } catch (FieldNotInitializedException e) { } String pvtids = ""; ArrayList list = PersonEventHelper.getListPersonEventForEvent(context, id); if(!list.isEmpty()){ Vector vecpvt = new Vector(list); pvtids = Utils.implodeList(vecpvt, "|"); } String valid_id = null; try{ valid_id = context.getDataDictionary().getRefIdByCode("Ct_Statut", "VAL"); }catch(Exception e){ e.printStackTrace(); } String enAttValid_id = null; try{ enAttValid_id = context.getDataDictionary().getRefIdByCode("Ct_Statut", "EAV"); }catch(Exception e){ e.printStackTrace(); } %> " ou="<%=\"/read_event.fl?id=\" + id %>" >
"/> <% if (EventCategory.TMK.toString().equals(eventCategory)) { %> <% } if (EventCategory.MEET.toString().equals(eventCategory)) { %> "/> <% if (evtQuota > 0) { %> <% } %> <% } %>
<%= Utils.getMessage(session, "L81ED", "Nombre de participants") %>
<%--if ( EventCategory.MEET.toString().equals(eventCategory)) { --%> <%-- "/> --%> <%--} --%> <% if (scriptList.size() > 0) { %> <% } else if (formList.size() > 0) { %> <%--http://u-project2.umanis.com/view.php?id=39749: Export guide / localités et Millésime --%> <% Integer mill = 0; try{ mill = (Integer)FormBean.lookup(context, "FrmMillesime_", ((String)row.get("FrmID"))); }catch(Exception e){ mill = 0; } if(mill !=null && mill>0){ %> <%} } else if (isActiveSalesInvest && isSalesInvest) { %> <% } else { %> <% } %> <%-- if (EventCategory.MEET.toString().equals(eventCategory)) { --%> <%-- } --%>
<% Hashtable row = (Hashtable)scriptList.elementAt(0); Integer cScrSeqNumI = (Integer) row.get("ScrSeqNum"); int cScrSeqNum = 0; if (cScrSeqNumI != null) { cScrSeqNum = cScrSeqNumI.intValue(); } %>
<% Hashtable row = (Hashtable)formList.elementAt(0); Integer cFrmSeqNumI = (Integer) row.get("FrmSeqNum"); int cFrmSeqNum = 0; if (cFrmSeqNumI != null) { cFrmSeqNum = cFrmSeqNumI.intValue(); } %>
<%=mill %>
   
<%-- --%>   
 
<% try { Event.getEvtZip(); Event.getEvtCity(); %>
<% } catch(FieldNotInitializedException e) { try { Event.getEvtCity(); %>
<% } catch (FieldNotInitializedException ex) {}} %> \" : \"\"%>"/>
" nbPix="35"> ">
<%-- Inscription table will be here --%>
<%-- Participation table will be here --%>
" onselect="refreshEvent();"> <% if (EventCategory.QST.toString().equals(eventCategory)) { %> <% } else if (EventCategory.TMK.toString().equals(eventCategory)) { %> <% } else { %> <% } %>
<%-- --%> <%-- Ignore these changes --%> <%if(listName.contains("EVTQSTNAT")){ %> "/> <%}else if("FRMMARCHE".equals(typeFrm)){ %> "/> <% }else{ //http://u-project2.umanis.com/view.php?id=41726 //41726: Questionnaire web - "Onglet Cibles"%> "/> <% } %>
" visible="<%= context.getAutoDisplayManager().hasEntry(\"Event\", \"Evénement 1\") %>"> <%/* */ %> " onselect="refreshPopFilles();"> " /> " onselect="refreshInteraction();"> "/> ">