_showSynergy__jsp.java 16.1 KB
/*
 * JSP generated by Resin-4.0.58 (built Fri, 24 Aug 2018 01:23:14 PDT)
 */

package _jsp._synergy;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import java.util.*;
import weaver.hrm.*;
import weaver.systeminfo.*;
import weaver.general.StaticObj;
import weaver.general.Util;
import weaver.hrm.settings.RemindSettings;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class _showSynergy__jsp extends com.caucho.jsp.JavaPage
{
  private static final java.util.HashMap<String,java.lang.reflect.Method> _jsp_functionMap = new java.util.HashMap<String,java.lang.reflect.Method>();
  private boolean _caucho_isDead;
  private boolean _caucho_isNotModified;
  private com.caucho.jsp.PageManager _jsp_pageManager;
  
  public void
  _jspService(javax.servlet.http.HttpServletRequest request,
              javax.servlet.http.HttpServletResponse response)
    throws java.io.IOException, javax.servlet.ServletException
  {
    javax.servlet.http.HttpSession session = request.getSession(true);
    com.caucho.server.webapp.WebApp _jsp_application = _caucho_getApplication();
    com.caucho.jsp.PageContextImpl pageContext = _jsp_pageManager.allocatePageContext(this, _jsp_application, request, response, null, session, 8192, true, false);

    TagState _jsp_state = null;

    try {
      _jspService(request, response, pageContext, _jsp_application, session, _jsp_state);
    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      _jsp_pageManager.freePageContext(pageContext);
    }
  }
  
  private void
  _jspService(javax.servlet.http.HttpServletRequest request,
              javax.servlet.http.HttpServletResponse response,
              com.caucho.jsp.PageContextImpl pageContext,
              javax.servlet.ServletContext application,
              javax.servlet.http.HttpSession session,
              TagState _jsp_state)
    throws Throwable
  {
    javax.servlet.jsp.JspWriter out = pageContext.getOut();
    final javax.el.ELContext _jsp_env = pageContext.getELContext();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    javax.servlet.jsp.tagext.JspTag _jsp_parent_tag = null;
    com.caucho.jsp.PageContextImpl _jsp_parentContext = pageContext;
    response.setContentType("text/html; charset=UTF-8");

    out.write(_jsp_string0, 0, _jsp_string0.length);
    
	User user = HrmUserVarify.getUser (request , response) ;
	if(user == null)  return ;
	Log logger= LogFactory.getLog(this.getClass());
	String isIE = (String)session.getAttribute("browser_isie");

    out.write(_jsp_string1, 0, _jsp_string1.length);
    weaver.synergy.SynergyComInfo sc;
    sc = (weaver.synergy.SynergyComInfo) pageContext.getAttribute("sc");
    if (sc == null) {
      sc = new weaver.synergy.SynergyComInfo();
      pageContext.setAttribute("sc", sc);
    }
    out.write(_jsp_string2, 0, _jsp_string2.length);
    weaver.synergy.SynergyManage sm;
    sm = (weaver.synergy.SynergyManage) pageContext.getAttribute("sm");
    if (sm == null) {
      sm = new weaver.synergy.SynergyManage();
      pageContext.setAttribute("sm", sm);
    }
    out.write(_jsp_string2, 0, _jsp_string2.length);
    weaver.conn.RecordSet rs;
    rs = (weaver.conn.RecordSet) pageContext.getAttribute("rs");
    if (rs == null) {
      rs = new weaver.conn.RecordSet();
      pageContext.setAttribute("rs", rs);
    }
    out.write(_jsp_string2, 0, _jsp_string2.length);
    weaver.page.element.ElementUtil eu;
    eu = (weaver.page.element.ElementUtil) pageContext.getAttribute("eu");
    if (eu == null) {
      eu = new weaver.page.element.ElementUtil();
      pageContext.setAttribute("eu", eu);
    }
    out.write(_jsp_string2, 0, _jsp_string2.length);
    weaver.page.PageUtil pu;
    pu = (weaver.page.PageUtil) pageContext.getAttribute("pu");
    if (pu == null) {
      pu = new weaver.page.PageUtil();
      pageContext.setAttribute("pu", pu);
    }
    out.write(_jsp_string2, 0, _jsp_string2.length);
    weaver.homepage.cominfo.HomepageCominfo hpc;
    hpc = (weaver.homepage.cominfo.HomepageCominfo) pageContext.getAttribute("hpc");
    if (hpc == null) {
      hpc = new weaver.homepage.cominfo.HomepageCominfo();
      pageContext.setAttribute("hpc", hpc);
    }
    out.write(_jsp_string2, 0, _jsp_string2.length);
    weaver.general.BaseBean baseBean;
    baseBean = (weaver.general.BaseBean) pageContext.getAttribute("baseBean");
    if (baseBean == null) {
      baseBean = new weaver.general.BaseBean();
      pageContext.setAttribute("baseBean", baseBean);
    }
    out.write(_jsp_string2, 0, _jsp_string2.length);
    
	//\u7531\u4e8e\u8fd9\u4e2a\u9875\u9762include \u5728 initjsp\u4e2d\uff0c\u56e0\u6b64\u8fd9\u91cc\u5c3d\u91cf\u51cf\u5c11\u903b\u8f91\uff1b
	//\u9996\u5148\u5224\u65ad\u9875\u9762\u5730\u5740\u662f\u5426\u5728\u6570\u636e\u5e93\u4e2d\u6709\u8bb0\u5f55\uff0c\u5982\u679c\u4e0d\u5728\uff0c\u76f4\u63a5return\u6389\uff1b   \u6ce8\uff1a\u6570\u636e\u5e93\u8bb0\u5f55\u662f\u521d\u59cb\u5316\u8fdb\u53bb\u7684\uff0c\u76ee\u524d\u4e0d\u53ef\u7ef4\u62a4
	String _synergypath = Util.null2String(request.getServletPath());
	String _s_hpid = sc.isSynergyModule(_synergypath,request);//\u6b63\u6570
	//baseBean.writeLog("showSynergy.jsp _synergypath:===>"+_synergypath);
	//baseBean.writeLog("showSynergy.jsp _s_hpid:===>"+_s_hpid);
	if(_s_hpid.equals("") || (null != request.getParameter("needsynergy") && "0".equals(request.getParameter("needsynergy")) && request.getHeader("User-Agent").toLowerCase().indexOf("msie") == -1) || (request.getAttribute("flag")!= null && request.getAttribute("flag").equals("1")))return;
	request.setAttribute("flag","1");

	// \u534f\u540c \u7684 _s_hpid \u90fd\u4e3a \u8d1f\u6570\uff0c \u503c\u4e3a synergy_base id
	_s_hpid = "-"+_s_hpid; 
	
	//\u5224\u65ad\u5f53\u524d\u534f\u540c\u662f\u5426\u542f\u7528
	rs.execute("select * from synergyconfig where hpid="+_s_hpid);
	if(rs.next()){
		if("0".equals(rs.getString("isuse")) || "".equals(rs.getString("isuse")))return;
	}else{
		return;
	}
	//\u5224\u65ad\u5f53\u524d \u534f\u540c\u662f\u5426\u6709 \u5143\u7d20\u5185\u5bb9\uff0c\u5982\u679c\u6ca1\u6709\u5219\u4e0d\u5c55\u793a
	rs.execute("select * from hplayout where hpid="+_s_hpid);
	String areaElements = "";
	if(rs.next()){
		if("".equals(rs.getString("areaElements"))){
			return;
		}else{
			areaElements = rs.getString("areaElements");
		}
	}else{
		return;
	}
	
	//\u5224\u65ad\u5f53\u524d\u7528\u6237\u5bf9 \u5f53\u524d\u534f\u540c\u662f\u5426\u6709 \u67e5\u770b\u5143\u7d20\u7684\u6743\u9650
	  
	int nodelUserid=pu.getHpUserId(_s_hpid,"-1",user);
    int nodelUsertype=pu.getHpUserType(_s_hpid,"-1",user);
    
    
    if("".equals(eu.filterElementByUserRight(areaElements,user.getUID()+"",nodelUserid,nodelUsertype))){
    	//\u65e0 \u6709\u6743\u9650\u67e5\u770b\u7684\u5143\u7d20
    	return ;
    }

	
   
	
	//\u6d41\u7a0b\u4e2d\u5fc3\u9700\u8981\u4f7f\u7528requestid
	int requestid = Util.getIntValue(request.getParameter("requestid"),-1);
	//\u6587\u6863\u4e2d\u5fc3\u5219\u4f7f\u7528\u201cdocid\u201d\uff0cid
	if(-1==requestid){
		 //docid
	     requestid = sc.getDocID(_synergypath,request);
	}
	
	//baseBean.writeLog("_s_hpid="+_s_hpid);
	
    

    out.write(_jsp_string3, 0, _jsp_string3.length);
    out.print((_s_hpid ));
    out.write(_jsp_string4, 0, _jsp_string4.length);
    out.print((requestid ));
    out.write(_jsp_string5, 0, _jsp_string5.length);
    out.print((SystemEnv.getHtmlLabelName(31835,user.getLanguage())+"-"+SystemEnv.getHtmlLabelName(32832,user.getLanguage()) ));
    out.write(_jsp_string6, 0, _jsp_string6.length);
  }

  private com.caucho.make.DependencyContainer _caucho_depends
    = new com.caucho.make.DependencyContainer();

  public java.util.ArrayList<com.caucho.vfs.Dependency> _caucho_getDependList()
  {
    return _caucho_depends.getDependencies();
  }

  public void _caucho_addDepend(com.caucho.vfs.PersistentDependency depend)
  {
    super._caucho_addDepend(depend);
    _caucho_depends.add(depend);
  }

  protected void _caucho_setNeverModified(boolean isNotModified)
  {
    _caucho_isNotModified = true;
  }

  public boolean _caucho_isModified()
  {
    if (_caucho_isDead)
      return true;

    if (_caucho_isNotModified)
      return false;

    if (com.caucho.server.util.CauchoSystem.getVersionId() != 6165118203484593848L)
      return true;

    return _caucho_depends.isModified();
  }

  public long _caucho_lastModified()
  {
    return 0;
  }

  public void destroy()
  {
      _caucho_isDead = true;
      super.destroy();
    TagState tagState;
  }

  public void init(com.caucho.vfs.Path appDir)
    throws javax.servlet.ServletException
  {
    com.caucho.vfs.Path resinHome = com.caucho.server.util.CauchoSystem.getResinHome();
    com.caucho.vfs.MergePath mergePath = new com.caucho.vfs.MergePath();
    mergePath.addMergePath(appDir);
    mergePath.addMergePath(resinHome);
    com.caucho.loader.DynamicClassLoader loader;
    loader = (com.caucho.loader.DynamicClassLoader) getClass().getClassLoader();
    String resourcePath = loader.getResourcePathSpecificFirst();
    mergePath.addClassPath(resourcePath);
    com.caucho.vfs.Depend depend;
    depend = new com.caucho.vfs.Depend(appDir.lookup("synergy/showSynergy.jsp"), 8079804810573193377L, false);
    _caucho_depends.add(depend);
    loader.addDependency(depend);
    depend = new com.caucho.vfs.Depend(appDir.lookup("page/maint/common/init.jsp"), -6701264299254985277L, false);
    _caucho_depends.add(depend);
    loader.addDependency(depend);
  }

  final static class TagState {

    void release()
    {
    }
  }

  public java.util.HashMap<String,java.lang.reflect.Method> _caucho_getFunctionMap()
  {
    return _jsp_functionMap;
  }

  public void caucho_init(ServletConfig config)
  {
    try {
      com.caucho.server.webapp.WebApp webApp
        = (com.caucho.server.webapp.WebApp) config.getServletContext();
      init(config);
      if (com.caucho.jsp.JspManager.getCheckInterval() >= 0)
        _caucho_depends.setCheckInterval(com.caucho.jsp.JspManager.getCheckInterval());
      _jsp_pageManager = webApp.getJspApplicationContext().getPageManager();
      com.caucho.jsp.TaglibManager manager = webApp.getJspApplicationContext().getTaglibManager();
      com.caucho.jsp.PageContextImpl pageContext = new com.caucho.jsp.InitPageContextImpl(webApp, this);
    } catch (Exception e) {
      throw com.caucho.config.ConfigException.create(e);
    }
  }

  private final static char []_jsp_string3;
  private final static char []_jsp_string4;
  private final static char []_jsp_string5;
  private final static char []_jsp_string6;
  private final static char []_jsp_string2;
  private final static char []_jsp_string0;
  private final static char []_jsp_string1;
  static {
    _jsp_string3 = "\r\n\r\n\r\n<head>\r\n\r\n\r\n\r\n<script type=\"text/javascript\">\r\n\r\n    function  resetItem(){\r\n       var centerTop = 0;\r\n	 	centerTop = jQuery(window).height()/2 - 16;\r\n	 	if(navigator.userAgent.indexOf(\"MSIE 8.0\")>0 && !window.innerWidth){//\u8fd9\u91cc\u662f\u91cd\u70b9\uff0c\u4f60\u61c2\u7684\r\n        	vart=setTimeout(\r\n        		function(){\r\n        			centerTop = jQuery(window).height()/2 - 16;\r\n        			jQuery(\"#synergy_moveDiv\").css(\"top\",centerTop);\r\n		 			jQuery(\"#synergy_moveDiv\").css(\"display\",\"block\");\r\n        			}\r\n       		,1000);\r\n      	}else\r\n      	{   \r\n		 	jQuery(\"#synergy_moveDiv\").css(\"top\",centerTop);\r\n		 	jQuery(\"#synergy_moveDiv\").css(\"display\",\"block\");\r\n	 	}\r\n		\r\n	 	if(jQuery(window.document.body).find(\"._synergyBox\").length > 0)\r\n		{\r\n			var ptop ;\r\n			var bodyheight = jQuery(window.document.body).height();\r\n			var headHeight = 0;\r\n			headHeight = jQuery(window.document).find(\".e8_boxhead\").height();\r\n			ptop = headHeight+1;\r\n			\r\n			jQuery(\"#synergy_framecontent\").css(\"top\",ptop);\r\n			var phei = bodyheight - ptop;\r\n			jQuery(\"#synergy_framecontent\").css(\"height\",phei);\r\n		}else{\r\n			jQuery(window.document).find(\"#synergy_framecontent\").css(\"height\",window.document.body.scrollHeight);\r\n		}\r\n		var executetime=0;\r\n       //\u8bbe\u7f6e\u9ad8\u5ea6\r\n        setTimeout(function reset(){\r\n          //alert($(window.document.body).height());\r\n		 // alert($(window).height())\r\n	\r\n	      if(executetime<5){\r\n			   var syheight=window.document.body.scrollHeight<$(window).height()?$(window).height():window.document.body.scrollHeight;\r\n			   jQuery(window.document).find(\"#synergy_framecontent\").css(\"height\",syheight);\r\n			   executetime++;\r\n			   reset();\r\n			  }\r\n             \r\n		   },1000);\r\n	\r\n    }\r\n\r\n	jQuery(document).ready(function(){\r\n	 	var centerTop = 0;\r\n	 	centerTop = jQuery(window).height()/2 - 16;\r\n	 	if(navigator.userAgent.indexOf(\"MSIE 8.0\")>0 && !window.innerWidth){//\u8fd9\u91cc\u662f\u91cd\u70b9\uff0c\u4f60\u61c2\u7684\r\n        	vart=setTimeout(\r\n        		function(){\r\n        			centerTop = jQuery(window).height()/2 - 16;\r\n        			jQuery(\"#synergy_moveDiv\").css(\"top\",centerTop);\r\n		 			jQuery(\"#synergy_moveDiv\").css(\"display\",\"block\");\r\n        			}\r\n       		,1000);\r\n      	}else\r\n      	{   \r\n		 	jQuery(\"#synergy_moveDiv\").css(\"top\",centerTop);\r\n		 	jQuery(\"#synergy_moveDiv\").css(\"display\",\"block\");\r\n	 	}\r\n		\r\n	 	if(jQuery(window.document.body).find(\"._synergyBox\").length > 0)\r\n		{\r\n			var ptop ;\r\n			var bodyheight = jQuery(window.document.body).height();\r\n			var headHeight = 0;\r\n			headHeight = jQuery(window.document).find(\".e8_boxhead\").height();\r\n			ptop = headHeight+1;\r\n			\r\n			jQuery(\"#synergy_framecontent\").css(\"top\",ptop);\r\n			var phei = bodyheight - ptop;\r\n			jQuery(\"#synergy_framecontent\").css(\"height\",phei);\r\n		}else{\r\n			jQuery(window.document).find(\"#synergy_framecontent\").css(\"height\",window.document.body.scrollHeight);\r\n		}\r\n		var executetime=0;\r\n       //\u8bbe\u7f6e\u9ad8\u5ea6\r\n        setTimeout(function reset(){\r\n          //alert($(window.document.body).height());\r\n		 // alert($(window).height())\r\n	\r\n	      if(executetime<5){\r\n			   var syheight=window.document.body.scrollHeight<$(window).height()?$(window).height():window.document.body.scrollHeight;\r\n			   jQuery(window.document).find(\"#synergy_framecontent\").css(\"height\",syheight);\r\n			   executetime++;\r\n			   reset();\r\n			  }\r\n             \r\n		   },1000);\r\n		   //resize\u91cd\u7f6e\u534f\u540c\u533a\r\n		   jQuery(window).resize(function(){\r\n		        resetItem();\r\n		        var iframe = jQuery(window.document).find(\"#synergy_framecontent\").contents();\r\n		        if(jQuery(window.document.body).find(\"._synergyBox\").length > 0){\r\n		           jQuery(iframe[0].body).find(\"#Element_Container\").css(\"height\",($(window).height()-jQuery(window.document).find(\".e8_boxhead\").height())+'px');\r\n		        }else{\r\n		        jQuery(iframe[0].body).find(\"#Element_Container\").css(\"height\",($(window).height()-10)+'px');\r\n		        }\r\n		   });\r\n		   \r\n	});\r\n	function movebtnClick_handle()\r\n	{\r\n		 //var evt = document.createEvent(\"MouseEvents\");   \r\n        //evt.initEvent(\"click\", true, true);\r\n		 //window.frames[\"synergy_framecontent\"].document.getElementById(\"relbtn\").click();\r\n		 jQuery(\"#synergy_framecontent\").contents().find(\"#relbtn\").click();\r\n		\r\n	}\r\n	\r\n</script>\r\n</head>\r\n<body>\r\n<div style=\"z-index:99996\">\r\n<iframe id=\"synergy_framecontent\" src=\"/synergy/showSynergyFrame.jsp?hpid=".toCharArray();
    _jsp_string4 = "&requestid=".toCharArray();
    _jsp_string5 = "\"\r\n	frameborder=no scrolling=no \r\n    style=\"top: 0px;\r\n    right: 0px;\r\n    position: fixed;\r\n    width: 0px;\r\n    z-index:99997;\r\n    \"\r\n></iframe>\r\n<div id=\"synergy_moveDiv\" title=\"".toCharArray();
    _jsp_string6 = "\" onclick=\"javascript:movebtnClick_handle();\" style=\"z-index:99998;cursor: pointer;width:10px;height:33px;position:fixed;right:0px;display:none\";>\r\n 	<img id=\"synergy_moveImgBtn\" src=\"/page/resource/userfile/image/synergy/left_wev8.png\"/>\r\n</div>\r\n</div>\r\n</body>\r\n".toCharArray();
    _jsp_string2 = "\r\n".toCharArray();
    _jsp_string0 = "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n".toCharArray();
    _jsp_string1 = "\r\n\r\n".toCharArray();
  }
}