Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\cti\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" 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; } //boolean activateCTI = (cti != null); final String DEFAULT_VOCALCOM_CODEBASE = ""; String javascriptToInclude = null; boolean isicomCTI = false; boolean isicomAppletCTI = false; // DGE : vocalcom add-on. boolean vocalcomCTI = false; boolean sibiloCTI = false; boolean isCCACTI = false; //**********Fin CCA*********** boolean genesysCTI = false; boolean algoriaCTI = false; String serverURL = null; String idService = null; if (activateCTI) { try { if (cti != null) { javascriptToInclude = cti.getJavaScriptInclude(); idService = cti.getImplementation().getProviderId(); if ("isicom".equalsIgnoreCase(idService)){ isicomCTI = true; } else if ("isicom_applet".equalsIgnoreCase(idService)) { isicomAppletCTI = true; } else if ("vocalcom".equalsIgnoreCase(idService)) { vocalcomCTI = true; } else if ("sibilo".equalsIgnoreCase(idService)){ sibiloCTI = true; serverURL = cti.getImplementation().getOption("URL", ""); if ("".equals(serverURL)){ logger.warn("CTI SIBILO Error, option 'CTI.Option.URL' not initialised"); } } else if ("genesys".equalsIgnoreCase(idService)) { // If the genesys agent is not logged in the activate cti variable is set to false. if (!"1".equals((String)session.getAttribute(CTIHelper.SESSION_ATTRIBUTE_GENESYSLOGGED))) { genesysCTI = true; activateCTI = false; } } else if ("algoria".equalsIgnoreCase(idService)) { // If the algoria agent is not logged in the activate cti variable is set to false. if (!"1".equals((String)session.getAttribute(CTIHelper.SESSION_ATTRIBUTE_ALGORIALOGGED))) { algoriaCTI = true; activateCTI = false; } } else if ("cca".equalsIgnoreCase(idService)) { isCCACTI = true; } } else { String CTIproviderClassName = context.getContextParameter("CTI.Provider"); if (CTIproviderClassName != null && CTIproviderClassName.indexOf("Genesys") > -1) { activateCTI = false; } } } catch(Exception e) { logger.error("CTI Service Error : ", e); //javascriptToInclude = ""; javascriptToInclude = null; activateCTI = false; } } String telephonyMode = "Auto"; if (isicomAppletCTI) { telephonyMode = context.getContextParameter("CTI.Option.ISICOM_TelephonyMode"); if (telephonyMode == null) telephonyMode = "Auto"; }%> <html> <head> <% if (idService != null) { %> <title><fl:getMessage code="L2025" alt="E-DEAL"/> CTI <%=idService.toUpperCase()%></title> <% } else { %> <title><fl:getMessage code="L2025" alt="E-DEAL"/> CTI </title> <% } %> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/master_css.jsp"> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/utils.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/cookie.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/jquery/jquery.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ajax/ajax.js"></script> <script language="javascript"> var telephonyMode = '<%=telephonyMode%>'; <%if (activateCTI && javascriptToInclude != null && actHasLic && hasCTIRole) {%> <jsp:include flush="true" page="<%=javascriptToInclude%>"/> <%}%> function doOnLoad() { <%if (activateCTI) {%> doOnLoadCTI(); <%}%> } function doOnUnLoad() { <%if (activateCTI) {%> doOnUnLoadCTI(); <%}%> } function doUnload() { if (eraseCookie) { eraseCookie('EdealCtiWindow'); } } 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'); } // For CCA function doCall(pPhone, pObj, pID) { doCallGlobal(pPhone, pObj, pID); } function doCallGlobal(pPhone, pObj, pID) { <%if (activateCTI) {%> doCallCTI(pPhone, pObj, pID); <%}%> addInteraction(pPhone, pObj, pID); } 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> </head> <% if (activateCTI && actHasLic && hasCTIRole) { if (isicomCTI) { String ctiOnLoadString = "doOnLoadCTI(" + activateCTI + ")"; //logger.debug("doOnloadCTI(doBlur=" + activateCTI + ")"); %> <body onload="<%=ctiOnLoadString%>" onunload="doUnload()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <object id="EDealCtl" classid="clsid:A15E094E-F670-4899-8339-7C46BFD7D266" codebase="edealCTI.CAB#version=1,1,0,0" width="100%" height="100%"> <param name="LPKPath" VALUE="edealCTI.lpk"> <param name="PopupUrl" value="<fl:webapp/>/receive_call.fl?"> <param name="PopupProperties" value="menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400"> <param name="Dbg" value="True"> </object> <br> </body> <% } else if (sibiloCTI) { %> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="doOnLoad()" onunload="doOnUnLoad()"> <div align="center"> <applet width=1000 height=40 NAME="sibilo" CODE="fr.appline.sibilo.agent.agentlight.client.LightWeightClient" ARCHIVE="./sibilo/lightagent.jar" MAYSCRIPT="true"> <PARAM NAME="graphicConfiguration" VALUE="./sibilo/lightagent_graphic_config.xml"> <PARAM NAME="numPortRequest" VALUE="1111"> <PARAM NAME="server" VALUE="<%=serverURL%>"> <PARAM NAME="lang" VALUE="fr"> <PARAM NAME="country" VALUE="FR"> <PARAM NAME="scriptable" value="true"> <PARAM NAME="mayscript" value="true"> </applet> <applet width=1000 height=90 NAME="stats" CODE="fr.appline.sibilo.agent.agentlight.statbar.StatBar" ARCHIVE="./sibilo/lightagent.jar"> <PARAM NAME="nb_lines_agent" VALUE="2"> <PARAM NAME="nb_lines_services" VALUE="1"> </applet> </div> </body> <% } else if (vocalcomCTI) { String ctiOnLoadString = "doOnLoadCTI()"; //String ctiOnLoadString = "doOnLoadCTI2()"; %> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="<%=ctiOnLoadString%>"> <%-- onunload="doUnload()" --%> <!-- <SCRIPT for="window" event="onload"> //window.onunload = unload; //window.onbeforeunload = beforeunload(); //window.onresize = resize; //alert("loading"); </SCRIPT> --> <div id="conteneur"> <% if (cti != null) { %> <object id="WSA_CTI_BAR" classid="clsid:D82F4AEA-E455-11D3-A715-204C4F4F5020" codebase="<%=cti.getImplementation().getOption("VOCALCOM.URL", DEFAULT_VOCALCOM_CODEBASE)%>" width="800px" height="100px" > </object> <% } else { %> <object id="WSA_CTI_BAR" classid="clsid:D82F4AEA-E455-11D3-A715-204C4F4F5020" codebase="<%=DEFAULT_VOCALCOM_CODEBASE%>" width="800px" height="100px" > </object> <% } %> <br> <!-- <a href="#" onclick="javascript:doOnLoadCTI('true');">init</a> <a href="#" onclick="javascript:doConnect();">login</a> <a href="#" onclick="javascript:doLogin('24310','','20001');">login2</a> --> </div> </body> <% } else if (isCCACTI){ %> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="doOnLoad()" onunload="doOnUnLoad()"> <%-- <object id="CCA" classid="clsid:95920304-7AFA-11D3-92BC-0008C799EBB1" width="100%" height="100%"> </object> --%> <%-- <object id="CCA" codebase="CCA_CTI.CAB#version=1,0,0,0" classid="clsid:C70F9DE0-C0D8-4BAD-BB76-FF779C1E67D4" width="100%" height="100%"> <param name="PopupUrl" value="<fl:webapp/>/cti/call.jsp?"> <param name="PopupProperties" value="menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400"> </object> <OBJECT ID="CCA" CLASSID="CLSID:0F8C5E96-369D-4258-B40B-47AEE020AC89" CODEBASE="CCA_CTI.CAB#version=1,0,0,0"> <param name="PopupUrl" value="http://www.e-deal.com/"> </OBJECT> --%> <object id="CCA" codebase="CCA_CTI.CAB#version=1,0,0,0" classid="CLSID:0F8C5E96-369D-4258-B40B-47AEE020AC89" width="100%" height="100%"> <param name="PopupUrl" value="<fl:webapp/>/cti/call.jsp?"> <param name="PopupProperties" value="menubar=no,status=yes,toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400"> </object> <%-- <script language="jscript" type="text/javascript" for="CCA" event=""> </script> --%> </body> <% } else if (cti != null && "algoria".equalsIgnoreCase(cti.getImplementation().getProviderId())) { %> <body onload="doOnLoad()" onunload="doUnload()"> <fl:getMessage code="M710F" alt="Cette fenêtre est utilisée par le CTI ALGORIA. Merci de ne pas la fermer."/> <br> <br> <br> <img src="<fl:webapp/>/icons/3rdparty/Algoria.gif"> </body> <% } else if (activateCTI && isicomAppletCTI) { %> <body onload="doCtiOnLoad()" onunload="doUnload()"> <div id="object_css" style="top: 0px; left: 0px; bottom: 0px; height: 100%;"> <fl:bigTabs ignoreList="true" objectTitle="ISI-Com CTI"> <APPLET codeBase='<fl:webapp/>/cti/isicom_applet/' height='0' archive='CTI.jar' width='0' code='CTI_Applet.class' name='oCTIObject' id='oCTIObject' mayscript> </APPLET> <table style="width: 100%;" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel" style="text-align: left; width: 33%;"> <fl:getMessage code="F6188" alt="Etat conn."/> </td> <td id="bConnexCTI" class="dataValue" style="width: 67%;"></td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel" style="text-align: left; width: 33%;"> <fl:getMessage code="F6189" alt="Etat PCB"/> </td> <td id="bLibAppelDe" class="dataValue" style="width: 67%;"></td> </tr> </table> </td> </tr> </table> <br> <span class="dataLabel" style="width: 100%;"><fl:getMessage code="M610E" alt="Cette fênetre est utilisée par le CTI ISICOM. Merci de ne pas la fermer."/></span> <%-- Debug Clear Call testing <form action="#"> <input type="text" name="disconref"><input type=button name=disconnect onclick="pcbCSTA_CLEAR_CALL(document.forms[0].disconref.value, '');"> </form> --%> <br> <div id="ISICOM_DEBUG" style="display: none;"> <input name="numCall"></input> <BUTTON onclick="j_makeCall(document.getElementsByName('numCall')[0].value)" >Appeler</BUTTON> <BUTTON onclick="j_holdCall()" style="display:none;" id="BtnHoldCall">Mettre en attente</BUTTON> <BUTTON onclick="j_retrieveCall()" style="display:none;" id="BtnRetrieveCall">Reprendre</BUTTON> <BUTTON onclick="j_clearCall()" style="display:none;" id="BtnClearCall">Raccrocher</BUTTON> <BUTTON onclick="j_trfCall()" style="display:none;" id="BtnTrfCall">Transferer</BUTTON> <BUTTON onclick="j_askCall()" style="display:none;" id="BtnAskCall">Decrocher</BUTTON> </div> </fl:bigTabs> <br> <center> <a id="isicomDebugHref" href="javascript:activateDebug()"><fl:getMessage code="M610F" alt="Activer le mode debug"/></a> </center> </div> </body> <%-- *********** ANY OTHER CTI ******* --%> <%-- CAUTION depending on the conditions in the else if statements, this block of code can be not reached --%> <% } else { %> <body onload="doOnLoad()"> </body> <% } %> <%} else { %> <%-- *********** NO CTI DETECTED ******* --%> <body onunload="doUnload()"> <script language="javascript">if (createCookie) { createCookie('EdealCtiWindow','1'); }</script> <fl:getMessage code="L658C" alt="Le service CTI n\'est pas activé, ou vous n\'avez pas accès"/><br><br><br> <table class="container" width="100%" style="margin-top: 5px;"> <tr class="fieldline"> <td colspan="2" style="text-align: center;"> <a href="javascript:window.close()"><img style="border:none" src="<fl:webapp/>/icons/ico/fermer_red_long.gif"></a> </td> </tr> </table> </body> <% } %> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de