<%@page import="weaver.login.LoginMsg"%> <%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page import="weaver.general.Util,weaver.hrm.User, weaver.rtx.RTXExtCom, weaver.rtx.RTXConfig, weaver.hrm.settings.BirthdayReminder, weaver.hrm.settings.RemindSettings, weaver.systeminfo.setting.HrmUserSettingHandler, weaver.systeminfo.setting.HrmUserSetting, weaver.general.TimeUtil, weaver.login.Account" %> <%@ page import="java.net.*" %> <%@ page import="java.util.*,HT.HTSrvAPI,java.math.*" %> <%@ page import="java.sql.Timestamp" %> <%@ page import="weaver.general.GCONST" %> <%@ page import="weaver.general.IsGovProj" %> <%@ page import="weaver.file.Prop" %> <%@page import="java.io.FileInputStream"%> <%@ include file="/systeminfo/init_wev8.jsp" %> <% if(true){ String params = request.getQueryString(); if(params==null){ response.sendRedirect("/wui/main.jsp"); }else{ response.sendRedirect("/wui/main.jsp?"+params); } return; } %> <%if("false".equals(isIE)){ //当前非浏览器不支持Ecology经典主题 request.setAttribute("labelid","27889"); request.getRequestDispatcher("/wui/common/page/sysRemind.jsp").forward(request,response); }else{ %> <%@ include file="/systeminfo/template/templateCss.jsp" %> <%@ include file="/docs/common.jsp" %> <% String acceptlanguage = request.getHeader("Accept-Language"); if(!"".equals(acceptlanguage)) acceptlanguage = acceptlanguage.toLowerCase(); boolean NoCheck=false; RecordSet.executeSql("select NoCheckPlugin from SysActivexCheck where NoCheckPlugin='1' and logintype='1' and userid="+user.getUID()); if(RecordSet.next()) NoCheck=true; if(!NoCheck){ %> <% } int isgoveproj = Util.getIntValue(IsGovProj.getPath(),0);//0:非政务系统,1:政务系统 Date newdate = new Date() ; long datetime = newdate.getTime() ; Timestamp timestamp = new Timestamp(datetime) ; String CurrentDate = (timestamp.toString()).substring(0,4) + "-" + (timestamp.toString()).substring(5,7) + "-" +(timestamp.toString()).substring(8,10); String CurrentTime = (timestamp.toString()).substring(11,13) + ":" + (timestamp.toString()).substring(14,16); HrmScheduleDiffUtil.setUser(user); boolean isSyadmin=false; //判断分权管理员 RecordSet.executeSql("select loginid from hrmresourcemanager where loginid = '"+user.getLoginid()+"'"); if(RecordSet.next()){ isSyadmin = true; } if(!isSyadmin){ RecordSet.executeSql("select loginid from hrmresource where loginid = '"+user.getLoginid()+"'"); if(RecordSet.next()){ isSyadmin = false; } else { isSyadmin = true; } } String isSignInOrSignOut="0";//是否启用前到签退功能 String onlyworkday = "1";//只在工作日签到 RecordSet.executeSql("select needsign,onlyworkday from hrmkqsystemSet "); if(RecordSet.next()){ isSignInOrSignOut = ""+RecordSet.getInt("needsign"); onlyworkday = ""+RecordSet.getInt("onlyworkday"); } boolean isWorkday = HrmScheduleDiffUtil.getIsWorkday(CurrentDate); if(onlyworkday.equals("0"))isWorkday=true;//如果非工作日也要签到 //判断当前用户当天有没有签到 String signType="1"; String sql=""; sql="select distinct t1.id from voting t1,VotingShareDetail t2 where t1.id=t2.votingid and t2.resourceid="+user.getUID()+" and t1.status=1 "+ " and t1.id not in (select distinct votingid from votingresource where resourceid ="+user.getUID()+")" +" and (t1.beginDate<'"+CurrentDate+"' or (t1.beginDate='"+CurrentDate+"' and (t1.beginTime is null or t1.beginTime='' or t1.beginTime<='"+CurrentTime+"'))) " ; RecordSet.executeSql(sql); while(RecordSet.next()){ String votingid = RecordSet.getString("id"); %> <%}%> <% boolean checkchattemp = false; String chatserver = Util.null2String(weaver.general.GCONST.getCHATSERVER());//检测即时通讯是否开启 if(!"".equals(chatserver)) checkchattemp = true; //String frommain = Util.null2String(request.getParameter("frommain")) ; ChgPasswdReminder reminder = new ChgPasswdReminder(); RemindSettings settings=reminder.getRemindSettings(); String birth_valid = settings.getBirthvalid(); String birth_remindmode = settings.getBirthremindmode(); BirthdayReminder birth_reminder = new BirthdayReminder(); if(birth_valid!=null&&birth_valid.equals("1")&&birth_remindmode!=null&&birth_remindmode.equals("0")){ String today = TimeUtil.getCurrentDateString(); if( application.getAttribute("birthday")==null||application.getAttribute("birthday")!=today){ application.setAttribute("birthday",today); ArrayList birthEmployers=birth_reminder.getBirthEmployerNames(user); application.setAttribute("birthEmployers",birthEmployers); } ArrayList birthEmployers=(ArrayList)application.getAttribute("birthEmployers"); if(birthEmployers.size()>0){ %> <%}}%> <% String username = ""+user.getUsername() ; String userid = ""+user.getUID() ; String usertype = "" ; if(user.getLogintype().equals("1")) usertype = "1" ; else usertype = ""+(-1*user.getType()) ; char separator = Util.getSeparator() ; Calendar today = Calendar.getInstance(); String currentyear = Util.add0(today.get(Calendar.YEAR), 4) ; String currentmonth = Util.add0(today.get(Calendar.MONTH)+1, 2) ; String currentdate = Util.add0(today.get(Calendar.DAY_OF_MONTH), 2) ; String currenthour = Util.add0(today.get(Calendar.HOUR_OF_DAY), 2) ; String initsrcpage = "" ; String logintype = Util.null2String(user.getLogintype()) ; String Customertype = Util.null2String(""+user.getType()) ; int targetid = Util.getIntValue(request.getParameter("targetid"),0) ; //String loginfile = Util.null2String(request.getParameter("loginfile")) ; String loginfile = Util.getCookie(request , "loginfileweaver") ; String message = Util.null2String(request.getParameter("message")) ; String logmessage = Util.null2String((String)session.getAttribute("logmessage")) ; //自动生成个人计划 //autoPlan.autoSetPlanDay(""+user.getUID(),user); if(targetid == 0) { if(!logintype.equals("2")){ //initsrcpage="/workspace/WorkSpace.jsp"; initsrcpage="/homepage/HomepageRedirect.jsp"; }else{ initsrcpage="/docs/news/NewsDsp.jsp"; } } String gopage = Util.null2String(request.getParameter("gopage")); String frompage = Util.null2String(request.getParameter("frompage")); if(!gopage.equals("")){ gopage=URLDecoder.decode(gopage); if(!"".equals(frompage)){ BaseBean.writeLog(frompage); initsrcpage = gopage+"&message=1&id="+user.getUID(); }else{ initsrcpage = gopage; } } else { username = user.getUsername() ; userid = ""+user.getUID() ; if(logintype.equals("2")){ switch(targetid) { case 1: // 文档 - 新闻 initsrcpage = "/docs/news/NewsDsp.jsp?id=1" ; break ; case 2: // 人力资源 - 新闻 initsrcpage = "/docs/news/NewsDsp.jsp?id=2" ; break ; case 3: // 财务 - 组织结构 initsrcpage = "/org/OrgChart.jsp?charttype=F" ; break ; case 4: // 物品 - 搜索页面 initsrcpage = "/lgc/catalog/LgcCatalogsView.jsp" ; break ; case 5: // CRM - 我的客户 initsrcpage = "/CRM/data/ViewCustomer.jsp?CustomerID="+userid ; break ; case 6: // 项目 - 我的项目 initsrcpage = "/proj/search/SearchOperation.jsp" ; break ; case 7: // 工作流 - 我的工作流 initsrcpage = "/workflow/request/RequestView.jsp" ; break ; case 8: // 工作流 - 我的工作流 initsrcpage = "/system/SystemMaintenance.jsp" ; break ; case 9: // 工作流 - 我的工作流 initsrcpage = "/cpt/CptMaintenance.jsp" ; break ; } }else{ switch(targetid) { case 1: // 文档 - 新闻 initsrcpage = "/docs/report/DocRp.jsp" ; break ; case 2: // 人力资源 - 新闻 initsrcpage = "/hrm/report/HrmRp.jsp" ; break ; case 3: // 财务 - 组织结构 initsrcpage = "/fna/report/FnaReport.jsp" ; break ; case 4: // 物品 - 搜索页面 initsrcpage = "/lgc/report/LgcRp.jsp" ; break ; case 5: // CRM - 我的客户 initsrcpage = "/CRM/CRMReport.jsp" ; break ; case 6: // 项目 - 我的项目 initsrcpage = "/proj/ProjReport.jsp" ; break ; case 7: // 工作流 - 我的工作流 initsrcpage = "/workflow/WFReport.jsp" ; break ; case 8: // 工作流 - 我的工作流 initsrcpage = "/system/SystemMaintenance.jsp" ; break ; case 9: // 工作流 - 我的工作流 initsrcpage = "/cpt/report/CptRp.jsp" ; break ; } } } if(!relogin0.equals("1")&&frommain.equals("yes")){ logmessages=(Map)application.getAttribute("logmessages"); logmessages.put(""+user.getUID(),logmessage); } logmessages=(Map)application.getAttribute("logmessages"); logmessages.put(""+user.getUID(),logmessage); if(!relogin0.equals("1")&&!frommain.equals("yes")&&!logmessage.equals("")){ session.setAttribute("frommain","true"); %> <%}%> <%if(relogin0.equals("1")&&!logmessage.equals("")){ boolean is_relogin_open=Prop.getPropValue("hrm_mfstyle","is_relogin_open").equalsIgnoreCase("true"); if(is_relogin_open){ %> <%} }%> <%=templateTitle%> - <%=username%> <% if(needusb0==1&&"2".equals(usbtype0)){ String randLong = ""+Math.random()*1000000000; String serialNo = user.getSerial(); HTSrvAPI htsrv = new HTSrvAPI(); String sharv = ""; sharv = htsrv.HTSrvSHA1(randLong, randLong.length()); sharv = sharv + "04040404"; String ServerEncData = htsrv.HTSrvCrypt(0, serialNo, 0, sharv); %> <% }%> <%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %> <%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %> <%@ include file="/favourite/FavouriteShortCut.jsp" %>
<%String templateLogoBottom = "/images/StyleGray/ecologyLogoB_wev8.jpg"; if(!logoBottom.equals("")&&!logoBottom.equals("0")) templateLogoBottom = "/TemplateFile/"+logoBottom; %> <% if(logo.equals("0")||logo.equals("")){ %> <% }else{ if(!logoBottom.equals("")&&!logoBottom.equals("0")){ %> <% } } %> <%if(weaver.general.GCONST.getMOREACCOUNTLANDING()){%> <%//多账号%> <%List accounts =(List)session.getAttribute("accounts"); if(accounts!=null&&accounts.size()>1){ Iterator iter=accounts.iterator(); %> <%}%> <%}%>
<%if(!logintype.equals("2")){%> <%}%>
<% if(isSignInOrSignOut.equals("1")&&isWorkday&&!isSyadmin){ String currentYearMonthDate=currentyear+"-"+currentmonth+"-"+currentdate; RecordSet.executeSql("SELECT 1 FROM HrmScheduleSign where userId="+user.getUID()+" and userType='"+user.getLogintype()+"' and signDate='"+currentYearMonthDate+"' and signType='1' and isInCom='1'"); if(RecordSet.next()){ signType="2"; } %> <% } %>
<%=SystemEnv.getHtmlLabelName(16646,user.getLanguage())%>           
<%! private Map getProperties(String propertyPath) { Map skinConfig = new HashMap(); Properties config = new Properties(); try { config.load(new FileInputStream(propertyPath)); } catch (Exception e) { e.printStackTrace(); return skinConfig; } Enumeration enumeration = config.propertyNames(); while (enumeration.hasMoreElements()) { String key = (String)enumeration.nextElement(); String value = config.getProperty(key, ""); skinConfig.put(key, value); } return skinConfig; } %> <% weaver.systeminfo.template.UserTemplate userTemplate = new weaver.systeminfo.template.UserTemplate(); userTemplate.getTemplateByUID(user.getUID(),user.getUserSubCompany1()); int extendtempletvalueid = userTemplate.getExtendtempletvalueid(); rsExtend.executeSql("select * from extandHpThemeItem where extandHpThemeId=(select id from extandHpTheme where id=" + extendtempletvalueid + ") and isopen=1"); %> <% if((isHaveMessager&&!userid.equals("1")&&isHaveMessagerRight==1)||isHaveEMessager){ %> <%}%> <% if(checkchattemp){ %> <%}%> <%if("1".equals(MouldStatusCominfo.getStatus("scheme"))||"".equals(MouldStatusCominfo.getStatus("scheme"))){ %> <%}%> <%if("1".equals(MouldStatusCominfo.getStatus("message"))||"".equals(MouldStatusCominfo.getStatus("message"))){ %> <%}%> <%if("1".equals(MouldStatusCominfo.getStatus("doc"))||"".equals(MouldStatusCominfo.getStatus("doc"))){ %> <%} %> <%if("1".equals(MouldStatusCominfo.getStatus("workflow"))||"".equals(MouldStatusCominfo.getStatus("workflow"))){ %> <%} %> <%if(isgoveproj==0){%> <%if(software.equals("ALL") || software.equals("CRM")){%> <%if("1".equals(MouldStatusCominfo.getStatus("crm"))||"".equals(MouldStatusCominfo.getStatus("crm"))){ %> <%}%> <%if("1".equals(MouldStatusCominfo.getStatus("proj"))||"".equals(MouldStatusCominfo.getStatus("proj"))){ %> <%}%> <%}%> <%}%> <%if("1".equals(MouldStatusCominfo.getStatus("meeting"))||"".equals(MouldStatusCominfo.getStatus("meeting"))){ %> <%}%> <%if(rtxClient.isValidOfRTX()){ RTXConfig rtxConfig = new RTXConfig(); String RtxOrElinkType = (Util.null2String(rtxConfig.getPorp(RTXConfig.RtxOrElinkType))).toUpperCase(); if("ELINK".equals(RtxOrElinkType) && !RTXConfig.isSystemUser(user.getLoginid())){ %> <%} else if(!RTXConfig.isSystemUser(user.getLoginid())){%> <%}%> <%}%>
<%}%> <% HrmUserSettingHandler handler = new HrmUserSettingHandler(); HrmUserSetting setting = handler.getSetting(user.getUID()); boolean rtxOnload = setting.isRtxOnload(); if(rtxClient.isValidOfRTX() && rtxOnload){ String rtxorelinkurl = ""; RTXConfig rtxConfig = new RTXConfig(); String RtxOrElinkType = (Util.null2String(rtxConfig.getPorp(RTXConfig.RtxOrElinkType))).toUpperCase(); if("ELINK".equals(RtxOrElinkType)){ rtxorelinkurl = "EimClientOpen.jsp"; } else { rtxorelinkurl = "RTXClientOpen.jsp"; } %> <% }else{ %> <% } %> <% String docsid = ""; String pop_width = ""; String pop_hight = ""; String is_popnum = ""; String popupsql = "select docid,pop_num,pop_hight,pop_width,is_popnum from DocDetail t1, "+tables+" t2,DocPopUpInfo t3 where t1.id=t2.sourceid and t1.id = t3.docid and (t1.ishistory is null or t1.ishistory = 0) and (t3.pop_startdate <= '"+CurrentDate+"' and t3.pop_enddate >= '"+CurrentDate+"') and pop_num > is_popnum"; RecordSet.executeSql(popupsql); while(RecordSet.next()){ docsid = RecordSet.getString("docid"); pop_hight = RecordSet.getString("pop_hight"); pop_width = RecordSet.getString("pop_width"); is_popnum = RecordSet.getString("is_popnum"); if("".equals(pop_hight)) pop_hight = "500"; if("".equals(pop_width)) pop_width = "600"; %> <%}%> <% if(isHaveEMessager){ %> <%@ include file="/messager/joinEMessage.jsp"%> <% }else{ if((user.getUID()!=1)&&isHaveMessagerRight==1){ %> <%@ include file="/messager/join.jsp" %> <%}}%> <%} %>