| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 |
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
- <%@ page import="cn.sinobest.framework.comm.iface.IOperator" %>
- <%@ page import="cn.sinobest.sysmngr.comm.ConVar" %>
- <%@ page import="cn.sinobest.framework.util.Util,cn.sinobest.framework.util.DTOUtil,cn.sinobest.framework.util.DateUtil,cn.sinobest.framework.util.ConfUtil,cn.sinobest.framework.comm.Environment"%>
- <%@ page import="java.util.List,java.util.Map" %> <%@ page import="cn.sinobest.sysmngr.service.blank.BlankService" %>
- <%@ page import="cn.sinobest.sysmngr.service.blank.BlankService" %>
- <%@ page import="java.text.DateFormat,java.text.SimpleDateFormat,java.util.Date" %>
- <%@include file="./taglib.jsp" %>
- <%@ page import="cn.sinobest.appcomm.service.sy.AppcommSyService"%>
- <%
- final String token = DTOUtil.getToken(response,session);
- //字典获取方法
- final String DICT_MODE = ConfUtil.getSysParam("app.dictMode","server");
- IOperator Operator = null;
- Object obj = request.getSession().getAttribute(ConVar.LOGIN_SESSION_ID);
- String CurDate = DateUtil.CurDate.YYYYMMDD_ZH.getDate();
- //始终比设定的时间多1分钟,这样系统超时的话就会自动跳到登录界面
- //例如系统有可能在SESSION 50分钟的时候,开始不用,那么需要等到1个小时以后,才会自动转到登录界面
- long timeout = 3700*1000;
- String LoginID ="";
- String SessionID ="";
- String OperName ="";
- String OperUnitName="";
- String LoginType = (String)request.getSession().getAttribute("LOGINTYPE");
- String OperId = "";
- String shortcutHtml = "";
- String OperType2 = "";
- if(obj != null){
- Operator = (IOperator)obj;
- LoginID = Operator.getLoginID();
- OperName = Operator.getOperName();
- OperId = Operator.getOperID();
- OperUnitName = Operator.getOperUnitName();
- SessionID = (String)request.getSession().getId();
- OperType2 = Operator.getOperType2();
- BlankService blankService = (BlankService)Util.getBean("blankService");
- shortcutHtml = blankService.getShortcutHtml(OperId,request.getContextPath());
- }
-
- if(LoginType==null){
- LoginType="loginsb";
- }
- boolean isSheBaoUser = true;
- if(OperType2 != null && !"1".equals(OperType2)){
- isSheBaoUser = false;
- }
-
- String jsMin = "";
- if (Environment.getAppProductMode()) {
- jsMin = "-min";
- }
-
- //首页按钮,根据用户类型跳转不同首页,管理员、窗口用户、科室用户
- // Object obj = request.getSession().getAttribute(ConVar.LOGIN_SESSION_ID);
- // IOperator Operator = (IOperator) obj;
- String OperID = Operator.getOperID();
- AppcommSyService appcommSyService = (AppcommSyService)Util.getBean("appcommSyService");
- String usertype = appcommSyService.getUserTypeByRight(OperID);
-
- String syurl="";
-
- if(usertype.equals("ksuser")){
- syurl="framework/blank2.jsp?RightID=blank";
- request.getSession().setAttribute("SYUSERTYPE", "KS");
- }else if(usertype.equals("ckuser")){
- syurl="ck/web/ywsl/ywsl_q.jsp?RightID=blank";
- request.getSession().setAttribute("SYUSERTYPE", "CK");
- }else{
- syurl="framework/blank3.jsp?RightID=blank";
- }
- %>
- <html>
- <head>
- <title>系统标题栏</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <%-- <% if ("-min".equals(jsMin)) { %>
- <link href="${ctx}/themes/default/fw-all-default<%=jsMin%>.css" rel="stylesheet" type="text/css">
- <% } else { %> --%>
- <link href="${ctx}/themes/default/default.css" rel="stylesheet" type="text/css">
- <%-- <% } %> --%>
-
- <!--[if IE 6]>
- <link href="${ctx}/themes/default/ie6.css" rel="stylesheet" type="text/css">
- <![endif]-->
- <link href="${ctx}/themes/default/banner.css" rel="stylesheet" type="text/css">
- <script src="${ctx}/js/comm/lib/jquery.js"></script>
- <script src="${ctx}/js/comm/lib/json2<%=jsMin%>.js"></script>
- <script src="${ctx}/js/comm/fw/ajax<%=jsMin%>.js"></script>
- <script src="${ctx}/js/comm/lib/jquery.cookie.js" language="JavaScript" type="text/javascript"></script>
- <script src="<%=request.getContextPath()%>/js/comm/fw/encrypt.js"></script>
- <script src="<%=request.getContextPath()%>/js/comm/fw/encrypt2.js"></script>
- </head>
- <style>
- .topover img{
- border: 0px;
- width: 16px;
- height: 16px;
- padding:0 4px 4px 2px;
- vertical-align:middle;
- }
- .bannerbutton a{
- text-decoration: none;
- border: 0px solid white;
- padding: 1px 6px 1px 6px;
- }
- .bannerbutton a:hover{
- border: 0px solid #F1C40F;
- color: #F1C40F;
- font-weight: bold;
- }
- .tdLeft{
- width: 13px;height: 22px;
- background: url('source/bg-left.png') no-repeat;
- }
- .tdRight{
- width: 13px;height: 22px;
- background: url('source/bg-right.png') no-repeat;
- }
- .tdCenter{
- height: 22px;
- line-height:20px;
- background: url('source/bg-center.png') repeat-x;
- }
- .userimg{
- width: 20px;height: 20px;
- background: url('source/user.png') no-repeat;
- display:inline-block;
- }
- /*.bannerbutton table p{
- display:block !important;
- margin-block-start:1em !important;
- margin-block-end:1em !important;
- margin-inline-start:0px;
- margin-inline-end:0px;
- margin-top:-12px !important;
- }
- */
- </style>
-
- <body leftmargin="0" topmargin="0">
- <FORM name="frm" method="post" action="<%=request.getContextPath()%>/framework/security/<%=LoginType%>!logout.do" >
- <input type="hidden" name="_rtnURL" value="<%=request.getContextPath()%>/framework/banner.do" />
-
- <div id="_bannerbutton" class="bannerbutton" style="height:100%;">
- <table width=100% height=100% cellSpacing=1 cellPadding=1 border=0>
- <tr>
- <td width="100%" align="right" nowrap>
- <table border=0 cellSpacing=0 cellPadding=0 class="userName">
- <tr height="25px">
- <td class="tdLeft"></td>
- <td class="tdCenter">
- <span class="userimg"> </span>
- <span class="topover"><%=OperName%></span>
- <span class="topover"><%=OperUnitName%></span>
- </td>
- <td class="tdRight"> </td>
- </tr>
- </table>
- <p class="header_right_box">
- <a class="topover" href="${ctx}/jsp/<%=syurl %>" target=workspace ><img src="${ctx}/jsp/framework/source/banner-home.png">首页</a>
- <!--<a class="topover" href="javascript:void(0);" onclick="showBulletinDialog();"><img src="${ctx}/jsp/framework/source/banner-notice.png">公告</a> -->
- <!--<a class="topover" href="javascript:void(0);" onclick="showShortcut();"><img src="${ctx}/jsp/framework/source/banner-shortcut.png">常用菜单</a>-->
- <%-- <a class="topover" href="javascript:void(0);" onclick="mpass();" ><img src="${ctx}/jsp/framework/source/banner-pwd.png">修改密码</a>
- <a class="topover" href="javascript:void(0);" onclick="relogon();" ><img src="${ctx}/jsp/framework/source/banner-relogin.png">重新登录</a>
- <a class="topover" href="javascript:void(0);" onclick="doclose();"><img src="${ctx}/jsp/framework/source/banner-exit.png">退出</a> --%>
- <!-- <a class="topover" href="javascript:doLink();" >帮助</a> -->
- </p>
- </td>
- </tr>
- </table>
- </div>
- <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="header_bg">
- <tr>
- <td width="461"><span class="logo-name">湛江一窗通办系统</span><!-- <img src="${ctx}/themes/default/images/banner5.gif" width="458" height="49">--></td>
- <td width="32" background="#0B408B;"> </td>
- </tr>
- </table>
- </FORM>
- </body>
- <script language="javascript">
- var contextPath='${ctx}';
- var GVAR = {'dictMode':'<%=DICT_MODE%>',
- 'dicts':{}
- };
- var token = '<%=token%>';
-
- var shortData = null;
- //窗口的非正常退出时调用
- //window.attachEvent("onunload",doCloseWin);
-
- //document.all._bannerbutton.style.top="20px";
- setTimeout("doReload()",<%=timeout%>);//刷新
- function doReload(){
- if(self.top.window.detachEvent){
- self.top.window.detachEvent("onunload",doCloseWin);
- }else{
- self.top.window.removeEventListener("onunload",doCloseWin);
- }
- var services=[{serviceId:'seccuritySession',method:'iftimeout',parameters:{ifjy:true}}];
-
- $.ajax({
- url:contextPath+'/ajaxAdapter.do'
- ,data:{parameters:JSON.stringify(services)}
- ,dataType :'json'
- ,cache:false
- ,async:false
- ,type:'post'
- ,error:function (request, textStatus, errorThrown) {}
- ,success:function (data, textStatus) {
- if(data.Token !=null){
- token =data.Token;//更新全局变量token标志
- }
- //校验业务处理是否正确执行
- if("1"!=data.FHZ){//出错了,弹出错误提醒
- if ("loginTimeout" == data.FHZ) {
- var flag=window.confirm("登录超时,是否重新登录?");
- if(flag){
- var nWidth = screen.availWidth-10;
- var nHeight = screen.availHeight-50;
- window.open("<%=request.getContextPath()%>"+"/index.jsp","","top=0,left=0,width="+nWidth+",height="+nHeight+",toolbar=no,resizable=yes,status=1,scrollbars")
-
- window.opener=null;
- window.open("","_self");
- window.close();
- try{ window.parent.close();}catch(e){}
- }
- }else if("CSRF" == data.FHZ){
- showMsg(data.MSG||'',3);
- return;
- }
- }else{
- self.location.reload();
- }
- },
- beforeSend:function(XMLHttpRequest ){
- var cToken = $.cookie("Token") || token;XMLHttpRequest.setRequestHeader('Token',cToken);
- }
-
- });
- }
-
- function relogon(){
- if (!window.confirm("是否退出系统?")) {
- return;
- }
- if(window.detachEvent){
- window.detachEvent("onunload",doCloseWin);;
- }else{
- window.removeEventListener("onunload",doCloseWin);
- }
- doCloseWin();
- createCookie("RS_ID","",-1,"/");
- createCookie("RS_PW","",-1,"/");
- window.top.location.href="${ctx}/jsp/framework/security/<%=LoginType%>_i.jsp";
- }
- function doclose(){
- if (window.confirm("是否退出系统?")) {
- window.parent.close();
- }
- }
- function mpass(){
- if(window.detachEvent){
- window.detachEvent("onunload",doCloseWin);;
- }else{
- window.removeEventListener("onunload",doCloseWin);
- }
- window.top.location.href="${ctx}/jsp/framework/security/pwdrest_u.jsp";
- }
-
- <%-- 此处用AJAX去销毁SESSION 销毁的动作在类 AjaxAction 内完成 --%>
- function doCloseWin(){
- var args = {'SD':'<%=SessionID%>'};
- var services=[{serviceId:'securityLogoutService',method:'logout',parameters:args}];
-
- $.ajax({
- url:contextPath+'/ajaxAdapter.do'
- ,data:{parameters:JSON.stringify(services)}
- ,dataType :'json'
- ,cache:false
- ,async:false
- ,type:'post'
- ,error:function (request, textStatus, errorThrown) {}
- ,success:function (data, textStatus) {
- if(data.Token!=null){
- token=data.Token;//更新全局变量token标志
- }
- },
- beforeSend:function(XMLHttpRequest ){
- var cToken = $.cookie("Token") || token;XMLHttpRequest.setRequestHeader('Token',cToken);
- }
-
- });
- }
- <%-- 弹出常用菜单窗口 --%>
- window.shortcut = {operId:"<%=OperId%>",shortcutHtml: "<%=shortcutHtml%>"};
- function showShortcut(){
- var title = encodeURIComponent('常用菜单');
- var url = "shortcut.jsp?title=" + title + "&_t=" + new Date().getTime();
- var position = "resizable:1;status:0;help:0;scroll:1;center:1;dialogWidth:900px;dialogHeight:450px";
- window.showModalDialog(url,window,position);
- }
- <%-- 弹出查阅公告窗口 --%>
- function showBulletinDialog(){
- var title = encodeURIComponent('查阅公告');//对话框的标题
- var url = "blank_bulletin.jsp?title="+title;
- var position="resizable:1;status:0;help:0;scroll:1;center:1;dialogWidth:1024px;dialogHeight:500px";
- window.showModalDialog(url,window,position);
- }
- </script>
- <script>
- parent.mLoadStatus.banner = true;
- </script>
- </html>
|