%/****************************************************************************** * 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" pageEncoding="UTF-8" import="com.edeal.frontline.*, java.util.*,com.edeal.frontline.services.*,com.edeal.frontline.services.cti.*"%><%@ page import="com.edeal.frontline.services.cti.CTIService, com.edeal.frontline.helper.CTIHelper" %><%@ page import="com.edeal.frontline.AccessControlManager" %><%@ page import="com.edeal.frontline.ActorBean" %><%@ page import="com.edeal.frontline.services.cti.CTIServiceClient" %><%@ page import="com.edeal.frontline.navigation.FlRequest" %><%@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(); DataDictionary dico = context.getDataDictionary(); String strActID = (String)session.getAttribute("actorID"); ActorBean actor = null; boolean hasCTIRole = false; try{ actor = new ActorBean(strActID, context); hasCTIRole = actor.hasRole("CTI"); } catch(Exception e){} boolean actHasLic; try { actHasLic = ((Boolean)session.getAttribute("actorHasCTI")).booleanValue(); } catch (Exception e) { // Lic V3 version actHasLic = context.getLicenceManager().actorHasSoftware(strActID, CTIServiceClient.CTI_LIC_CODE, LicenceManager.LicenceType.PermanentLicence, null); } //if CTI is activated, the CTI window will pop up. //if not, it is hidden in the main frameset and the ActiveX control should not be loaded. boolean activateCTI = false; String pActivateCTI = context.getContextParameter("ActivateCTI"); if (pActivateCTI != null && "true".equalsIgnoreCase(pActivateCTI) && hasCTIRole) { activateCTI = true ; } CTIServiceClient cti; try { cti = (CTIServiceClient)context.getServiceManager().getServiceClient(session, "CTI"); } catch (FlServiceException e) { cti = null; } String javascriptToInclude = null; boolean C3TCTI = false; String serverURL = null; String idService = null; String C3TAppletId = ""; String C3TServer = ""; String C3TAgentLogin = ""; String C3TAgentPassword = ""; if (activateCTI) { try { if (cti != null) { javascriptToInclude = cti.getJavaScriptInclude(); idService = cti.getImplementation().getProviderId(); if ("C3T".equalsIgnoreCase(idService)) { C3TCTI = true; C3TAppletId = "C3TApplet_" + strActID; C3TServer = cti.getOption("C3T_Server",""); try { C3TAgentLogin = (String)actor.getCustomProperty("ActC3TAgentLogin_"); } catch (FieldNotInitializedException e) { C3TAgentLogin = ""; } try { C3TAgentPassword = (String)actor.getCustomProperty("ActC3TAgentPassword_"); } catch (FieldNotInitializedException e) { C3TAgentPassword = ""; } if ("".equals(C3TServer)){ logger.warn("C3T Error, option 'CTI.Option.C3T_Server' not initialised"); } } } } catch(Exception e) { logger.error("CTI Service Error : ", e); //javascriptToInclude = ""; javascriptToInclude = null; activateCTI = false; } }%>
<%if (C3TCTI) { if (!"".equals(C3TServer) && !"".equals(C3TAgentLogin)) { %> <%}%> <%}%> <% if (C3TCTI) {%>