Edit C:\galaxie\Back\galaxie\cti\C3T\cti.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" 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; } }%> <html> <head> <script language="javascript"> <%if (activateCTI && javascriptToInclude != null && actHasLic && hasCTIRole) {%> <jsp:include flush="true" page="<%=javascriptToInclude%>"/> <%}%> function addInteraction(pPhone,pObj, pID){ var strQuery = '&'; if('Actor' == pObj) { if(pID == '<%=strActID%>') { strQuery += 'initIntActID=' + pID; } else { strQuery += 'initIntActID=<%=strActID%>;' + pID; } } else if('Person' == pObj) { strQuery += 'initIntPerID=' + pID; } else if('Enterprise' == pObj) { strQuery += 'initIntEntID=' + pID; } else if('Journalist' == pObj) { strQuery += 'initIntJouID=' + pID; } else if('Support' == pObj) { strQuery += 'initIntSupID=' + pID; } else if('Interaction' == pObj) { window.open('<fl:webapp/>/read_interaction.fl?id=' + pID, 'InteractionFrom', 'menubar=yes,status=yes,toolbar=yes,scrollbars=yes,resizable=yes,width=1024,height=768'); return; } else { return; } var dt = new Date(); strQuery += '&initIntDate=' + flEscape((dt.getDate() < 10 ? '0' + dt.getDate() : dt.getDate()) + '/' + ((dt.getMonth() + 1) < 10 ? '0' + (dt.getMonth() + 1) : (dt.getMonth() + 1)) + '/' + dt.getFullYear()); strQuery += '&initIntTimeBeg=' + flEscape((dt.getHours() < 10 ? '0' + dt.getHours() : dt.getHours()) + ':' + (dt.getMinutes() < 10 ? '0' + dt.getMinutes() : dt.getMinutes())); strQuery += '&initIntTimeEnd='; strQuery += '&initIntStiID=<%=dico.getRefIdByCode("IntStiID", "DONE")%>'; strQuery += '&initIntAtvID=<%=dico.getRefIdByCode("IntAtvID", "OUTPHONE")%>'; window.open('<fl:webapp/>/create_interaction.fl?phone=' + flEscape(pPhone) + strQuery, 'InteractionFrom', 'menubar=no,status=yes,toolbar=no,scrollbars=yes,resizable=yes,width=1024,height=800'); } function doAnswer(pRef) { <%-- alert("Entering cti/cti.jsp#doAnswer(pRef=" + pRef + ")..."); --%> <%if (activateCTI) {%> <%-- alert("cti/cti.jsp#doAnswer(pRef=)" + pRef + ") will try to do doAnswerCTI(pRef=" + pRef + ")"); --%> doAnswerCTI(pRef); <%}%> } function doRelease(pRef) { <%if (activateCTI) {%> doReleaseCTI(pRef); <%}%> } // Direct transfer for Isicom-applet function doDirectTransfer(pRef, pPhone) { <%if (activateCTI) {%> doDirectTransferCTI(pRef, pPhone); <%}%> } // Direct transfer. function doTransfer(pRef, pPhone) { <%if (activateCTI) {%> doTransferCTI(pRef, pPhone); <%}%> } // Isicom-applet function doTransferForm(pRef, pPhone, pobjID, pType) { <%if (activateCTI) {%> doTransferFormCTI(pRef, pPhone, pobjID, pType); <%}%> } // Isicom-applet function doSendIdentification(entCorpName, perName, perFstName, pRef) { <%if (activateCTI) {%> doSendIdentificationCTI(entCorpName, perName, perFstName, pRef); <%}%> } // ************ 2 phase transfer. ******************* function doInitiateTransfer(pPhone, pAttachedData, pReason) { <%if (activateCTI) {%> doInitiateTransferCTI(pPhone, pAttachedData, pReason); <%}%> } function doCompleteTransfer(pPhone, pReason) { <%if (activateCTI) {%> <%-- alert("In doCompleteTransfer(pPhone, pReason) of cti.jsp ."); --%> doCompleteTransferCTI(pPhone, pReason); <%}%> } function doReconnectTransfer(pReason) { <%if (activateCTI) {%> doReconnectTransferCTI(pReason); <%}%> } // ************ Hold & retrieve a call. ************* function doHoldCall() { <%if (activateCTI) {%> doHoldCallCTI(); <%}%> } // Specially for CCA function doAlternateCall() { <%if (activateCTI) {%> doAlternateCallCTI(); <%}%> } function doRetrieveCall() { <%if (activateCTI) {%> doRetrieveCallCTI(); <%}%> } function doAlternate() { <%if (activateCTI) {%> doAlternateCallCTI(); <%}%> } function beforeunload() { //alert('Fermer cette fen�tre manuellement n''est pas conseill�'); } </script> <%if (C3TCTI) { if (!"".equals(C3TServer) && !"".equals(C3TAgentLogin)) { %> <script language="javascript" SRC="<fl:webapp/>/js/cti/C3TConnector.js"></script> <script language="javascript"> setTimeout(function() { var conn = new C3TConnector(<%=C3TAppletId%>); if (!C3TConnector().isConnected()) { C3TConnector().connect('<%=C3TAgentLogin%>', '<%=C3TAgentPassword%>'); } //window.opener.C3TConnector = C3TConnector; },4000); </script> <%}%> <%}%> </head> <% if (C3TCTI) {%> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="background-color: white; background-repeat: no-repeat; background-position: top center; background-image: url('../../icons/C3T.gif');"> <div align="center"> <applet id="<%=C3TAppletId%>" archive="<fl:webapp/>/cti/C3T/pimconnector.jar" code="fr.c3t.ireflet.client.pim.tcp.TCPConnectorApplet" codebase="<fl:webapp/>/cti/C3T/" width="0" height="0" codebase_lookup="false"> <PARAM name="server" value="<%=C3TServer%>"> </applet> <br/> <br/> <br/> <br/> <br/> <br/> Fenêtre de connexion au bandeau téléphonique. <br/> Merci de ne pas fermer. </div> </body> <%}%> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de