⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uagentbar_jsp.java

📁 一个简单的java web项目 基于servlet构建
💻 JAVA
字号:
package org.apache.jsp.pages.softphone;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import cn.aresoft.po.SysUserInfo;
import cn.aresoft.fw.ServiceLocator;
import cn.aresoft.modules.sysbackmanage.SystemSetService;
import cn.aresoft.modules.ipandphone.IpPhoneService;
import cn.aresoft.modules.systemmanage.skillgroupmanage.SkillGroupService;;

public final class uAgentBar_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.List _jspx_dependants;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");

	String sServerMaster = "192.168.1.3";
	String sServerPort = "10100";
	String sServerProtocol = "tcp";
	
	SysUserInfo user = (SysUserInfo)session.getAttribute("sysuserinfo");
	SystemSetService agentService = (SystemSetService)ServiceLocator.getService("systemSetService");
	IpPhoneService phoneService = (IpPhoneService)ServiceLocator.getService("ipPhoneService");	
	SkillGroupService groupService = (SkillGroupService)ServiceLocator.getService("skillGroupService");	

      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<title>uAgentBar</title>\r\n");
      out.write("<script language=\"javascript\">\r\n");
      out.write("var sAgentId=\"");
      out.print(agentService.getUserAgentNo(user.getUserId()));
      out.write("\";\t\t\t\t//工号\t\r\n");
      out.write("var sPhone=\"");
      out.print(phoneService.getSubphoneForSoftphone(request.getRemoteAddr()));
      out.write("\";\t\t\t\t\t//分机号\t\r\n");
      out.write("var sName=\"");
      out.print(user.getTrueName());
      out.write("\";\t\t\t\t\t//名字\t\t\t\t\t\r\n");
      out.write("var sSkill = \"");
      out.print(groupService.findSkillGroupNameByUserId(user.getUserId().toString()));
      out.write("\";\t\t\t//技能\t\t\t\r\n");
      out.write("var sServerMaster = \"");
      out.print(sServerMaster);
      out.write("\";\t//CTI地址 \r\n");
      out.write("var sServerPort = \"");
      out.print(sServerPort);
      out.write("\";\t\t//端口 \r\n");
      out.write("var sServerProtocol = \"");
      out.print(sServerProtocol);
      out.write("\";\t//协议类型 \r\n");
      out.write("var sAlias = \"");
      out.print(user.getTrueName());
      out.write("\";\t\t\t\t\t//别名\r\n");
      out.write("var ctPath=\"");
      out.print(request.getContextPath());
      out.write("\";\r\n");
      out.write('\r');
      out.write('\n');
      out.write('\r');
      out.write('\n');
      out.write('\r');
      out.write('\n');
      out.write("\r\n");
      out.write("</script>\r\n");
      out.write("<script language=\"javascript\"  src=\"script/CallScript.js\"></script>\r\n");
      out.write("<script language=\"javascript\"  src=\"script/DealEvent.js\"></script>\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body style=\"margin: 0px\">\r\n");
      out.write("<OBJECT ID=\"uAgentBar\"\r\n");
      out.write("CLASSID=\"CLSID:5C6A622D-3116-4F2F-B5D0-E9529A84CF0F\"\r\n");
      out.write("CODEBASE=\"uAgentBar.ocx\" style=\"display:none\">\r\n");
      out.write("</object>\r\n");
      out.write("\r\n");
      out.write("<script language=\"javascript\" for=\"uAgentBar\" EVENT=\"AgentLocked\">\r\n");
      out.write("\tAgentLocked();\r\n");
      out.write("</script>\r\n");
      out.write("<script language=\"javascript\" for=\"uAgentBar\" EVENT=\"CallRing\">\r\n");
      out.write("\tInCommingCall();\r\n");
      out.write("</script>\r\n");
      out.write("<script language=\"javascript\" for=\"uAgentBar\" EVENT=\"AgentStatus\">\r\n");
      out.write("\tGetEventFromCTI();\r\n");
      out.write("</script>\r\n");
      out.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#66FFFF\" >\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td style=\"cursor:hand;\"><img id=\"login\" name=\"login\" src=\"icons/login_no.gif\" border=\"0\" alt=\"签入\" onMouseOut=\"MouseMoveEventOfImg('login','Out')\" onMouseOver=\"MouseMoveEventOfImg('login','Over')\" onClick=\"doLogin()\" /></td>\r\n");
      out.write("    <td style=\"cursor:hand;\"><img id=\"logout\" name=\"logout\" src=\"icons/logout_no.gif\" border=\"0\" alt=\"签出\" onMouseOut=\"MouseMoveEventOfImg('logout','Out')\" onMouseOver=\"MouseMoveEventOfImg('logout','Over')\" onClick=\"doLogout()\" /></td>\r\n");
      out.write("    <td style=\"cursor:hand;\"><img id=\"answer\" name=\"answer\" src=\"icons/answer_no.gif\" border=\"0\" alt=\"接听\" onMouseOut=\"MouseMoveEventOfImg('answer','Out')\" onMouseOver=\"MouseMoveEventOfImg('answer','Over')\" onClick=\"doAnswer()\" /></td>\r\n");
      out.write("    <td style=\"cursor:hand;\"><img id=\"clear\" name=\"clear\" src=\"icons/clear_no.gif\" border=\"0\" alt=\"挂机\" onMouseOut=\"MouseMoveEventOfImg('clear','Out')\" onMouseOver=\"MouseMoveEventOfImg('clear','Over')\" onClick=\"doClearCall()\" /></td>\r\n");
      out.write("    <td style=\"cursor:hand;\"><img id=\"busy\" name=\"busy\" src=\"icons/busy_no.gif\" border=\"0\" alt=\"示忙\" onMouseOut=\"MouseMoveEventOfImg('busy','Out')\" onMouseOver=\"MouseMoveEventOfImg('busy','Over')\" onClick=\"doBusy()\"  /></td>\r\n");
      out.write("    <td style=\"cursor:hand;\"><img id=\"idle\" name=\"idle\" src=\"icons/idle_no.gif\" border=\"0\" alt=\"示闲\" onMouseOut=\"MouseMoveEventOfImg('idle','Out')\" onMouseOver=\"MouseMoveEventOfImg('idle','Over')\" onClick=\"doIdle()\"  /></td>\r\n");
      out.write("    <td style=\"cursor:hand;\"><img id=\"hold\" name=\"hold\" src=\"icons/hold_no.gif\" border=\"0\" alt=\"保持\" onMouseOut=\"MouseMoveEventOfImg('hold','Out')\" onMouseOver=\"MouseMoveEventOfImg('hold','Over')\" onClick=\"doHold()\"  /></td>\r\n");
      out.write("    <td style=\"cursor:hand;\"><img id=\"retrieve\" name=\"retrieve\" src=\"icons/retrieve_no.gif\" border=\"0\" onMouseOut=\"MouseMoveEventOfImg('retrieve','Out')\" onMouseOver=\"MouseMoveEventOfImg('retrieve','Over')\" alt=\"接回\" onClick=\"doRetrieve()\" /></td>\r\n");
      out.write("\r\n");
      out.write("   \t<td style=\"cursor:hand;\"><img id=\"consult\" name=\"consult\" src=\"icons/consult_no.gif\" border=\"0\" alt=\"咨询\" onMouseOut=\"MouseMoveEventOfImg('consult','Out')\" onMouseOver=\"MouseMoveEventOfImg('consult','Over')\" onClick=\"doBeforeConsultCall()\" /></td>\r\n");
      out.write("    <td style=\"cursor:hand;\"><img id=\"transfer\" name=\"transfer\" src=\"icons/transfer_no.gif\" border=\"0\" alt=\"转移\" onMouseOut=\"MouseMoveEventOfImg('transfer','Out')\" onMouseOver=\"MouseMoveEventOfImg('transfer','Over')\" onClick=\"doBeforeTransfer()\" /></td>\r\n");
      out.write("\t<td style=\"cursor:hand;\"><img id=\"conference\" name=\"conference\" src=\"icons/conference_no.gif\" border=\"0\" alt=\"三方\" onMouseOut=\"MouseMoveEventOfImg('conference','Out')\" onMouseOver=\"MouseMoveEventOfImg('conference','Over')\" onClick=\"doBeforeConference()\" /></td>\r\n");
      out.write("    <td style=\"cursor:hand;\"><img id=\"callout\" name=\"callout\" src=\"icons/callout_no.gif\" border=\"0\" alt=\"呼出\" onMouseOut=\"MouseMoveEventOfImg('callout','Out')\" onMouseOver=\"MouseMoveEventOfImg('callout','Over')\" onClick=\"doBeforeCallOut(sPhone,'')\" /></td>\r\n");
      out.write("\r\n");
      out.write("    <td style=\"cursor:hand;\"><img id=\"reset\" name=\"reset\" src=\"icons/reset_no.gif\" border=\"0\" alt=\"复位\" onMouseOut=\"MouseMoveEventOfImg('reset','Out')\" onMouseOver=\"MouseMoveEventOfImg('reset','Over')\" onClick=\"doReset()\" /></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("\t\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
      out.write("<script language=\"javascript\">\r\n");
      out.write("\tInitOcx();\r\n");
      out.write("</script>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -