Edit C:\galaxie\Back\galaxie\admin\actor\read.jsp
<%/****************************************************************************** * Copyright (c) 2000-2013 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.synchro.domino.DominoConstants.DominoActorSynchroParams"%> <%@page import="com.edeal.frontline.synchro.domino.DominoConstants"%> <%@page import="com.edeal.frontline.synchro.webdavex.WebDavExConstants.WebDavExActorSynchroOptions"%> <%@page import="com.edeal.frontline.synchro.webdavex.WebDavExConstants"%> <%@page import="com.edeal.frontline.synchro.SyncUser.SynchroParamType"%> <%@page import="com.edeal.frontline.helper.custom.ActorHelper"%> <%@page import="com.edeal.frontline.helper.BasicHelper"%> <%@page import="com.edeal.frontline.synchro.googleapps.GoogleAppsConstants.GoogleAppsActorOptions"%> <%@page import="com.edeal.frontline.synchro.googleapps.GoogleAppsConstants"%> <%@page import="java.lang.reflect.Method"%> <%@page import="org.apache.commons.lang.StringUtils"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.EnterpriseBean" %> <%@ page import="java.util.*" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.LocationBean" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.PersonEventBean" %> <%@ page import="com.edeal.frontline.LicenceManager" %> <%@ page import="com.edeal.frontline.services.cti.CTIServiceClient" %> <%@ page import="com.edeal.frontline.helper.ContextHelper" %> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.ActorBean" id="Actor" 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(); LicenceManager licenceManager = context.getLicenceManager(); String id = null; try { id = Actor.getID(); } catch (FieldNotInitializedException e) { } String actTzoID=null; try { actTzoID = Actor.getActTzoID(); session.setAttribute("ActTzoID",actTzoID); }catch(FieldNotInitializedException e){} StringBuffer fullName = new StringBuffer(); if (id != null) { String val; try { val = Actor.getActCivID(); fullName.append(dico.getRefDisp(session, "ActCivID", val) + " "); } catch (FieldNotInitializedException e) { } try { val = Actor.getActFstName(); fullName.append(val + " "); } catch (FieldNotInitializedException e) { } try { val = Actor.getActName(); fullName.append(val + " "); } catch (FieldNotInitializedException e) { } try { val = Actor.getActCode(); fullName.append("(" + val + ")"); } catch (FieldNotInitializedException e) { } } ActorHelper actHelper = null; try { actHelper = BasicHelper.factory(Actor); } catch (FrontlineException e) { logger.error("Could not get ActorHelper(?!)", e); } String actSyncType; try { actSyncType = dico.getRefCode("ActSyncType", Actor.getActSyncType()); } catch (Exception e) { actSyncType = null; } HashMap<Enum, String> syncOptions = actHelper.getActSyncOptions(); String actZip = null; try { actZip = Actor.getActZip(); } catch(FieldNotInitializedException e) { } String actCity = null; try { actCity = Actor.getActCity(); } catch(FieldNotInitializedException e) { } String sfwId = request.getParameter("SfwID"); String picID = null; try { picID = Actor.getActPicID(); } catch (FieldNotInitializedException e) { } %> <script language="JavaScript"> <%if (picID != null) {%> var fois = 0; var actPic; function afficheImage() { if (fois != 0) { return; } var actPicWidth = (actPic.width < 250 ? 250 : actPic.width + 50); var actPicHeight = ((actPic.height + 100) < 250 ? 250 : (actPic.height + 100)); var ouvrirImage = window.open('<fl:webapp/>/admin/actor/showPhoto.jsp?id=<%=picID%>','photoWindow','toolbar=0,location=0,menuBar=0,scrollbars=0,resizable=1,width=' + actPicWidth + ',height=' + actPicHeight); fois=1; } function doOnLoad() { actPic = new Image(); actPic.src = '<fl:webapp/>/download?id=<%=picID%>'; // Sometimes, for an unknown reason, we have to do it twice if (actPic.width == 0 && actPic.height == 0) { actPic = new Image(); actPic.src = '<fl:webapp/>/download?id=<%=picID%>'; } } <%}%> </script> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L2089\", false, true, \"Acteur\") %>" ou="<%= \"/read_actor.fl?id=\" + id %>"> <table class="container" cellpadding="0"> <tr> <td colspan="5" class="titreFiche"> <%=Utils.formatToWeb(fullName.toString(), false)%> </td> </tr> </table> <table class="container" cellpadding="0"> <tr class="ligne_separation"><td></td></tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="ActCode"/> <fl:fieldRead property="ActFunction"/> <tr class="fieldline"> <td id="Act.Address_label" class="dataLabel"><fl:label code="L2037"/></td> <td id="Act.Address_value" class="dataValue"> <div> <fl:getProperty name="Actor" property="ActAd1" alt="" postText="<br>"/> <fl:getProperty name="Actor" property="ActAd2" alt="" postText="<br>"/> <fl:getProperty name="Actor" property="ActAd3" alt="" postText="<br>"/> <fl:getProperty name="Actor" property="ActZip" alt="" postText=" "/><fl:getProperty name="Actor" property="ActCity" alt="" postText=""/><% try { Actor.getActZip(); Actor.getActCity(); %><br><% } catch(FieldNotInitializedException e) { try { Actor.getActCity(); %><br><% } catch (FieldNotInitializedException ex) {}} %> <fl:getProperty name="Actor" property="ActCtrID" alt="" preText="<%= (actZip != null && actCity == null) ? \"<br>\" : \"\"%>"/> </div> </td> </tr> <fl:fieldRead property="ActTzoID"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="ActPhone" format="phone"/> <fl:fieldRead property="ActMobile"/> <fl:fieldRead property="ActTymID" /> <fl:fieldRead property="ActPinWap" /> <fl:fieldRead property="ActFax"/> <tr class="fieldline"> <td id="ActMail_label" class="dataLabel"><fl:label code="F60E6"/></td> <td id="ActMail_value" class="dataValue"> <% try { String mail = Actor.getActMail(); %><a href="mailto:<%=mail%>"><%=Utils.formatToWeb(mail, false)%></a><% } catch (FieldNotInitializedException fnie) { %> <% } %> </td> </tr> <fl:fieldRead property="ActLogin"/> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> </table> <% if (context.getAutoDisplayManager().hasEntry("Actor", "Acteur 1")) { %> <fl:autodisplay name="Actor" zone="Acteur 1" title="true"/> <% } %> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="ActRead"> <fl:sTab id="ORGA" title="<%= Utils.getMessage(session, \"L641E\", false, true, \"Organisation\") %>"> <div> <fl:autodisplay name="Actor" zone="ActorOrga"/> </div> </fl:sTab> <fl:sTab id="PROFILE" title="<%= Utils.getMessage(session, \"L2038\", false, true, \"Profil\") %>"> <table class="data_column" cellpadding="0"> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <%-- <fl:fieldRead property="ActDashID" bean="true" href="true" disp="<%=\"/read_dashboard.fl?SfwID=\"+sfwId%>"/>--%> <% if (picID != null) { %> <tr> <td class="dataLabel"><fl:label code="F600A"/></td> <td class="dataValue"><a href="javascript:afficheImage()" ><fl:getMessage code="F9908" alt="Voir photo"/></a></td> </tr> <% } %> <tr> <td> <div> <fl:autodisplay name="Actor" zone="ActorRoles" tableDivTag="false" /> </div> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <% Vector permLics; try { permLics = Actor.getActPermLics(); } catch (FieldNotInitializedException e) { permLics = new Vector(); } Vector flotLics; try { flotLics = Actor.getActFloatLics(); } catch (FieldNotInitializedException e) { flotLics = new Vector(); } String perm = Utils.getMessage(session, "L6601", "Permanente"); String floating = Utils.getMessage(session, "L6602", "Flottante"); String notApplied = Utils.getMessage(session, "L6605", "Pas attribuée"); String[] softwareCodes = licenceManager.getLicencedSoftwareCodes(); for (String softCode : softwareCodes) { String softName = licenceManager.getLicencedSoftwareName(softCode); String licMsg; if (permLics.contains(softCode)) { licMsg = "<strong>" + perm + "</strong>"; } else if (flotLics.contains(softCode)) { licMsg = "<strong>" + floating + "</strong>"; } else { licMsg = notApplied; } String display = (softName == null ? softCode : softName + " (" + softCode + ")"); %> <tr class="fieldline"> <td class="dataLabel"><div><label><%=display%></label></div></td> <td class="dataValue"><div><%=licMsg%></div></td> </tr> <% } %> </table> </td> </tr> </table> </fl:sTab> <fl:sTab id="SALES" title="<%= Utils.getMessage(session, \"L60F4\", false, true, \"Sales\") %>"> <table class="data_column" cellpadding="0"> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="ActDoneBus"/> <fl:fieldRead property="ActWonBus" /> <fl:fieldRead property="ActRunBus" /> <fl:fieldRead property="ActVolWon" postText=" %"/> <fl:fieldRead property="ActValWon" postText=" %"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="ActCAWon" postText=" €"/> <fl:fieldRead property="ActCALost" postText=" €"/> <fl:fieldRead property="ActAim"/> <fl:fieldRead property="ActCoeffPondComCost"/> <fl:fieldRead property="ActSector"/> </table> </td> </tr> </table> </fl:sTab> <%-- Insert a CTI tab if there is a known CTI provider that needs specific actor fields. --%> <% CTIServiceClient cti = null; boolean isVocalcomCTI = false; boolean isCCACTI = false; boolean isGenesysCTI = false; boolean isC3TCTI = false; try { cti = (CTIServiceClient)context.getServiceManager().getServiceClient(session, "CTI"); isVocalcomCTI = ("vocalcom".equalsIgnoreCase(cti.getImplementation().getProviderId())); isGenesysCTI = ("genesys".equalsIgnoreCase(cti.getImplementation().getProviderId())); isC3TCTI = ("C3T".equalsIgnoreCase(cti.getImplementation().getProviderId())); } catch (Exception e) { //logger.warn("Error in CTI service :\nMessage : " + e.getMessage() + "\nCause : " + e.getCause()); } if (cti != null && isVocalcomCTI) { %> <fl:sTab id="CTI" title="CTI" visible="<%= isVocalcomCTI %>"> <div> <fl:autodisplay name="Actor" zone="ActorCTIVocalcom" title="true"/> </div> </fl:sTab> <% } else if (cti != null && isCCACTI) { %> <fl:sTab id="CTI" title="CTI" visible="<%= isCCACTI %>"> <table class="data_column" cellpadding="0"> <tr valign="top"> <td class="transparent" style="text-align: right"><fl:getMessage code="LFFFF" alt="CCA N° d'agent"/></td> <td><fl:getProperty name="Actor" property="ActCCANumAgent_" alt=" "/></td> <td class="transparent" style="text-align: right"><fl:getMessage code="LFFFF" alt="CCA groupe de traitement"/></td> <td><fl:getProperty name="Actor" property="ActCCAProcGroup_" alt=" "/></td> </tr> </table> </fl:sTab> <% } else if (cti != null && isGenesysCTI) { %> <fl:sTab id="CTI" title="CTI" visible="<%= isGenesysCTI %>"> <div> <fl:autodisplay name="Actor" zone="Profil Genesys" /> </div> </fl:sTab> <% } else if (cti != null && isC3TCTI) { %> <fl:sTab id="CTI" title="CTI" visible="<%= isC3TCTI %>"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="ActC3TAgentLogin_" alt="Identifiant de l'agent I-Reflet"/> </table> </fl:sTab> <%}%> <fl:sTab id="SERVICE" title="<%= Utils.getMessage(session, \"F0048\", false, true, \"Service\") %>" displayGroup="SERVICE"> <table class="data_column" cellpadding="0"> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="ActCsoID"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <% Vector nameCompRef = dico.getRefList(session, "ActCpoID"); Vector valCompRef = dico.getRefList(session, "ActNcoID"); Vector idValObject = null; Vector idCompObject = null; try { idValObject = Actor.getActNcoID(); } catch (FieldNotInitializedException ex) { idValObject = new Vector(); } try { idCompObject = Actor.getActCpoID(); } catch (FieldNotInitializedException ex) { idCompObject = new Vector(); } for (int i = 0; i < nameCompRef.size(); i++) { Vector currComp = (Vector) nameCompRef.elementAt(i); String currCompID = (String) currComp.elementAt(0); String currCompName = (String) currComp.elementAt(1); int index = idCompObject.indexOf(currCompID); int currObjectValue; try { if (index >= 0) { currObjectValue = ((Number)dico.getRefDisp(session, "ActNcoID", (String)idValObject.elementAt(index))).intValue(); } else { currObjectValue = ((Number)dico.getRefDisp(session, "ActNcoID", dico.getRefIdByCode("ActNcoID", "ZERO"))).intValue(); } } catch (Exception e) { logger.warn("Pas de niveau de compétence ajouté pour acteur. On utilise zéro"); currObjectValue = 0; } %> <tr valign="top"> <td class="dataLabel"><%= currCompName %></td> <td class="dataValue"> <%= currObjectValue %> </td> </tr> <% } %> </table> </td> </tr> </table> </fl:sTab> <fl:sTab id="SYNCHRO" title="<%= Utils.getMessage(session, \"L6422\", false, true, \"Synchronisation\") %>"> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="ActSyncType"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="ActSyncModel" bean="true" href="true" disp="/read_syncmodel.fl"/> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> <% if (syncOptions != null) { Iterator<Enum> iter = syncOptions.keySet().iterator(); Enum key = null; String value = ""; String msgCode = ""; String msgCodeDefault = ""; String msg = ""; while (iter.hasNext()) { %> <tr> <% boolean hasField = false; while (!hasField && iter.hasNext()) { key = iter.next(); if(!GoogleAppsActorOptions.ActSyncToken.equals(key)){ value = StringUtils.defaultIfEmpty(syncOptions.get(key), ""); try { Method meth = key.getClass().getMethod("getParamType"); SynchroParamType type = (SynchroParamType)meth.invoke(key); // Pasword just aren't displayed if (SynchroParamType.Password == type) { key = null; continue; } hasField = true; } catch (Exception e) { } try { Method meth = key.getClass().getMethod("getMsgCode", null); msgCode = (String)meth.invoke(key, null); } catch (Exception e) { msgCode = "XXXXX"; } try { Method meth = key.getClass().getMethod("getMsgCodeDefault", null); msgCodeDefault = (String)meth.invoke(key, null); } catch (Exception e) { msgCodeDefault = "XXXXX"; } msg = Utils.getMessage(session, msgCode, msgCodeDefault); } } %> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td id="ActSyncOpt<%= key %>_label" class="dataLabel"><div><label title="<%= msg %>"><%= msg %></label></div></td> <td id="ActSyncOpt<%= key %>_value" class="dataValue"> <div><%= value %></div> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <% hasField = false; key = null; while (!hasField && iter.hasNext()) { key = iter.next(); if(!GoogleAppsActorOptions.ActSyncToken.equals(key)){ value = StringUtils.defaultIfEmpty(syncOptions.get(key), ""); try { Method meth = key.getClass().getMethod("getParamType"); SynchroParamType type = (SynchroParamType)meth.invoke(key); // Pasword just aren't displayed if (SynchroParamType.Password == type) { key = null; continue; } hasField = true; } catch (Exception e) { } try { Method meth = key.getClass().getMethod("getMsgCode", null); msgCode = (String)meth.invoke(key, null); } catch (Exception e) { msgCode = "XXXXX"; } try { Method meth = key.getClass().getMethod("getMsgCodeDefault", null); msgCodeDefault = (String)meth.invoke(key, null); } catch (Exception e) { msgCodeDefault = "XXXXX"; } msg = Utils.getMessage(session, msgCode, msgCodeDefault); } } %> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <% if (key != null) { %> <td id="ActSyncOpt<%= key %>_label" class="dataLabel"><div><label title="<%= msg %>"><%= msg %></label></div></td> <td id="ActSyncOpt<%= key %>_value" class="dataValue"> <div><%= value %></div> </td> <% } else { %> <td> </td><td> </td> <% } %> </tr> </table> </td> <% } %> </tr> <% } %> </table> </fl:sTab> <fl:sTab id="ACTOR2" title="<%= context.getAutoDisplayManager().getTitle(session, \"Actor\", \"Acteur 2\") %>" visible="<%= context.getAutoDisplayManager().hasEntry(\"Actor\", \"Acteur 2\") %>"> <fl:autodisplay name="Actor" zone="Acteur 2"/> </fl:sTab> <fl:sTab id="ACTOR3" title="<%= context.getAutoDisplayManager().getTitle(session, \"Actor\", \"Acteur 3\") %>" visible="<%= context.getAutoDisplayManager().hasEntry(\"Actor\", \"Acteur 3\") %>"> <fl:autodisplay name="Actor" zone="Acteur 3"/> </fl:sTab> </fl:smallTabs> </fl:bigTabs>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de