Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\event\read_action.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" %> <%@ page import="java.util.*" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.AccessControlManager" %> <%@ page import="com.edeal.frontline.SalesInvestBean" %> <%@ page import="com.edeal.frontline.GuestListBean" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.*" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.helper.EventBaseHelper.EventCategory" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.EventBean" id="Event" 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 id = null; try { id = Event.getEvtID(); } catch(FieldNotInitializedException e) { } String eventCategoryID = null; try { eventCategoryID = Event.getEvtCategory(); } catch (FieldNotInitializedException e) { eventCategoryID =""; } String eventCategory = null; try { eventCategory = (String) dico.getRefDisp("Ect", "Te2", eventCategoryID); } catch (Exception e) { } boolean isActiveSalesInvest = SalesInvestBean.isSalesInvestActive(context); boolean isSalesInvest = false; try { isSalesInvest = Event.isEvtIsSalesInvest(); } catch (FieldNotInitializedException e) { } boolean isGuestRefresh = false; try { String[] field = { "GliID" }; String[][] query = { { "GliEvtID = " + Utils.formatToSQL(context,id) } }; Vector listGli = GuestListBean.listSummary(context, field, query); isGuestRefresh = listGli != null && listGli.size() > 0; } catch (FrontlineException e) { } String sfwID = (String) flRequest.getRequestParameterOrAttribute("SfwID"); // on détécte le type de l'évènement String typEvt = ""; try { typEvt = Event.getEvtCategory(); } catch (FieldNotInitializedException e) {} // On récupère l'ID de l'acteur connecté String actID = null; boolean fHasRightModif = false; boolean fHasRightSupp = false; if (session != null) { actID = (String)session.getAttribute("effectiveActorID"); if (actID == null) { actID = (String)session.getAttribute("actorID"); if (actID == null) { throw new FrontlineException("there is not an actor ID in session"); } } } try { ActorBean act = new ActorBean(actID, context); Vector<String> actRolesIDs = new Vector<String>(); Vector<String> vEvtActID = new Vector<String>(); // On récupère lese roles actRolesIDs.addAll(act.getRoles()); String roleADMID = dico.getRefIdByCode("ActRoles", "ADMIN"); /* Role Administrateur*/ String roleTECHADMID = dico.getRefIdByCode("ActRoles", "S_ADM_TECH"); /* Role Administrateur Technique*/ String role1ID = dico.getRefIdByCode("ActRoles", "D_ATTACH_DIR"); /* Role Attache de Direction*/ String role2ID = dico.getRefIdByCode("ActRoles", "D_SECR_DIR"); /* Role Secretariat de direction */ String role3ID = dico.getRefIdByCode("ActRoles", "R_RESP_RES_AFFIL"); /* Role Responsable Affilies */ String role4ID = dico.getRefIdByCode("ActRoles", "ASSO_SAL"); /* Role Association avec Salarié */ String role5ID = dico.getRefIdByCode("ActRoles", "ASSO_SANS_SAL"); /* Role Association sans Salarié*/ String role6ID = dico.getRefIdByCode("ActRoles", "D_DIR_PRES"); /* Role Directeur/Président*/ String role7ID = dico.getRefIdByCode("ActRoles", "J_RESP_POLE_JUR"); /* Role Responsable Pôle Réseau - Juridique - Qualité*/ String role8ID = dico.getRefIdByCode("ActRoles", "R_ASSIST_RES_AFFIL"); /* Role Assistant Réseau Affiliés */ if(!(actRolesIDs.isEmpty())) { // on prend le 1er role de l'acteur connecté String actRoleIDactuel = actRolesIDs.get(0).toString(); if (actRoleIDactuel.equals(roleADMID)) { fHasRightModif =true; fHasRightSupp =true; } else if (actRoleIDactuel.equals(roleTECHADMID)) { fHasRightModif =true; fHasRightSupp =false; } else if ( (typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "AGASSO")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "CAASSO")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "BNASSO"))) && ( actRoleIDactuel.equals(role4ID) || actRoleIDactuel.equals(role5ID)) ) { fHasRightModif =true; fHasRightSupp =true; } else if ( (typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "SEM")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "CONG")) ) && (actRoleIDactuel.equals(role6ID) || actRoleIDactuel.equals(role2ID)) ) { fHasRightModif =true; fHasRightSupp =true; } else if ( (typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "CM")) ) && (actRoleIDactuel.equals(role8ID))) { fHasRightModif =true; fHasRightSupp =true; } else if ( (typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "AGFED")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "CAFED")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "BNFED")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "CM"))) && (actRoleIDactuel.equals(role7ID)) ) { fHasRightModif =true; fHasRightSupp =true; } else if ( (typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "AGFED")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "CAFED")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "BNFED")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "CM")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "SEM")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "CONG")) ) && (actRoleIDactuel.equals(role1ID)) ) { fHasRightModif =true; fHasRightSupp =true; } else if ( (typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "COM")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "COPIL")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "CMTLBLS")) || typEvt.equals((String)dico.getRefIdByCode("EvtCategory", "CMTAPL"))) ) { fHasRightModif =true; fHasRightSupp =true; } /*On vérifie si l'acteur connecté appartient aux propriétaires de l'objet*/ try { // On récupère les IDs des acteurs de l'évènement vEvtActID.addAll(Event.getEvtActors()); } catch (FieldNotInitializedException e) { //nothing todo } for (int i = 0; i < vEvtActID.size(); i++) { if (actID.equals(vEvtActID.get(i))) { fHasRightModif =true; fHasRightSupp =true; } } } } catch (FrontlineException e) { } // vérifier si on a un Evénement AG à l'état Ouvert // Types du statut de l'Evenement String openStatutType = null; String closedStatutType = null; try { openStatutType = (String) dico.getRefIdByCode("EvtStatut_", "OPEN"); closedStatutType = (String) dico.getRefIdByCode("EvtStatut_", "CLOSED"); } catch (Exception e) { } // Type de l'Evenementt ag ASSO String eventTypeAssoID = null; try { eventTypeAssoID = (String) dico.getRefIdByCode("EvtCategory", "AGASSO"); } catch (Exception e) { } // Type de l'Evenementt ag FIL String eventTypeFedID = null; try { eventTypeFedID = (String) dico.getRefIdByCode("EvtCategory", "AGFED"); } catch (Exception e) { } // le statut String eventStatut_ID = null; try { eventStatut_ID = (String)Event.getCustomProperty("EvtStatut_"); } catch (FieldNotInitializedException e){ eventStatut_ID = ""; } Vector formList = (Vector)flRequest.getAttribute("formList"); String formID = null; String typeFrm = 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); }catch(FrontlineException e){ } } } %> <script type="text/javascript" language="javascript"> function doDelete(){ if (window.confirm('<fl:getMessage code="M2004" alt="Etes-vous sûr de vouloir supprimer?" js="true"/>') == true) { window.location = '<fl:link url="<%= \"/delete_evenement.fl\" + ( id != null ? \"?id=\" + id : \"\") %>"/>'; } } function delSales(id) { var fenetreChoix = window.open('<fl:webapp/>/delete_event_salesinvest.fl?evtID='+id , 'DelSalesInvest' , 'menubar=no,status=no,toolbar=no,scrollbars=no,resizable=yes,width=500,height=180'); } function changeSales(id) { var fenetreChoix = window.open('<fl:webapp/>/calculate_event_salesinvest.fl?evtID='+id , 'DelSalesInvest' , 'menubar=no,status=no,toolbar=no,scrollbars=no,resizable=yes,width=500,height=180'); } function doCreateGuestList(id) { var fenetreChoix = window.open('<fl:webapp/>/create_guestlist.fl?evtID=' + id + '&SfwID=<%=sfwID%>' , 'CreateGuestList' , 'menubar=no,status=no,toolbar=no,scrollbars=no,resizable=yes,width=500,height=180'); } function doRefreshGuestList(id) { var fenetreChoix = window.open('<fl:webapp/>/refresh_guestlist.fl?evtID=' + id + '&SfwID=<%=sfwID%>', 'RefreshGuestList' , 'menubar=no,status=no,toolbar=no,scrollbars=no,resizable=yes,width=500,height=180'); } function doWord(id,obj,informat) { format = "Word"; if (informat && informat == "PDF") { format = "PDF"; } window.open('<fl:webapp/>/fusion_document.fl?format=' + format + '&idObj='+id+'&object='+obj, 'listOpp', 'menubar=no,status=no,toolbar=no,scrollbars=auto,resizable=yes,width=860,height=460'); } function copyEvent() { window.location = '<fl:link url="<%= \"/copy_event.fl?id=\" + id %>"/>'; } function doPremierAppel() { } function doPriseRDV() { } function doSouhaiteRDV() { } function doSouhaiteDevis() { } function doAfficherPlus() { } </script> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1 actions_nolabel"> <a class="doc_fusion word" title="<fl:getMessage code="L6126" alt="Générer Document Word"/>" href="javascript:doWord('<fl:getProperty name="Event" property="EvtID" alt=""/>','Event','Word');"> <img src="<fl:webapp/>/icons/ico_word_inv.gif" border=0 width="15" height="15" alt="<fl:getMessage code="L6126" alt="Générer Document Word"/>"> </a> <a class="doc_fusion pdf" title="<fl:getMessage code="L6557" alt="Générer Document PDF"/>" href="javascript:doWord('<fl:getProperty name="Event" property="EvtID" alt=""/>','Event', 'PDF');"> <img src="<fl:webapp/>/icons/ico_acrobat_inv.gif" border=0 width="15" height="15" alt="<fl:getMessage code="L6557" alt="Générer Document PDF"/>"> </a> </div> </td> <td class="actions_cell_right"></td> </tr> <% if (fHasRightModif) { %> <fl:access name="Event" operation="edit"> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="<fl:link list="true" url="<%= \"/edit_event.fl?id=\" + Event.getID() %>"/>"> <p class="actions_tabletext"><fl:getMessage code="A0008" alt="Modifier"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> </fl:access> <%} if (openStatutType.equalsIgnoreCase(eventStatut_ID) && ( eventCategoryID.equalsIgnoreCase(eventTypeAssoID) || eventCategoryID.equalsIgnoreCase(eventTypeFedID) )) { %> <fl:access name="Event" operation="edit"> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="<fl:link list="true" url="<%= \"/cloturer_evenement.fl?id=\" + Event.getID() %>"/>"> <p class="actions_tabletext"><fl:getMessage code="LF0F8" alt="Clôturer l'événement"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> </fl:access> <%} if(fHasRightSupp) { %> <fl:access name="Event" operation="delete"> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:doDelete()"> <p class="actions_tabletext"><fl:getMessage code="A0007" alt="Supprimer"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> </fl:access> <%} %> <fl:access name="Event" operation="Create"> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="<fl:link url="<%= \"/duplicate_event.fl?id=\" + id %>"/>"> <p class="actions_tabletext"><fl:getMessage code="L662A" alt="Dupliquer"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <% if (isActiveSalesInvest && isSalesInvest) { %> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:changeSales('<%= id %>');"> <p class="actions_tabletext"><fl:getMessage code="L64F8" alt="Recalculer Invest. Ciaux"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:delSales('<%= id %>');"> <p class="actions_tabletext"><fl:getMessage code="L64F9" alt="Suppr. Invest. Ciaux"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> <% } %> <fl:access operation="create" name="PersonEvent"> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:doInscription();"> <p class="actions_tabletext"><fl:getMessage code="F80AF" alt="Inscription"/> +</p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <% if (EventCategory.QST.toString().equals(eventCategory) && typeFrm!=null && !typeFrm.isEmpty() && ("FRMGUIDE".equals(typeFrm) || "FRMSTAT".equals(typeFrm)) ) { %> <fl:access operation="create" name="PersonEvent"> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:doSendQstToAllPersons();"> <p class="actions_tabletext"><fl:getMessage code="LF35F" alt="Envoyer les questionnaires"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <fl:access operation="create" name="PersonEvent"> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:doReSendQstToAllPersons();"> <p class="actions_tabletext"><fl:getMessage code="LF360" alt="Relancer les questionnaires"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <fl:access name="Event" operation="edit"> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:initGenerateResponses('<%= id %>');"> <p class="actions_tabletext"><fl:getMessage code="LF351" alt="Générer les questionnaires"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <%if("FRMGUIDE".equals(typeFrm)){ %> <fl:access name="Event" operation="edit"> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:initIntegrateFrp('<%= id %>');"> <p class="actions_tabletext"><fl:getMessage code="LF354" alt="Intégrer les questionnaires"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <% } %> <% } %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de