check.jsp
5.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/updateclient/systeminfo/init_wev8.jsp"%>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<jsp:useBean id="baseBean" class="weaver.general.BaseBean" scope="page"/>
<html>
<head>
<title> E-cology升级程序</title>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<%
String checkpro = Util.null2String(request.getParameter("checkpro"));
String next = Util.null2String((String)request.getParameter("next"));
String localfile = Util.null2String((String)request.getSession(true).getAttribute("localfile"));
String uploadzip = Util.null2String((String)request.getSession(true).getAttribute("uploadzip"));
%>
<script type="text/javascript">
function cancel() {
window.location.href="/updateclient/selectZip.jsp";
}
var timeout2;
$(document).ready(function(){
var checkpro = "<%=checkpro%>";
var next = "<%=next%>";
if(checkpro =="") {//判断是否从本地升级直接跳转过来的
if(next == "1") {
$("#message").html("正在进行跳包检查...");
$.get('/check.do?date='+(new Date()).valueOf()+"&next=1",function(data){});
} else {
$.get('/check.do?date='+(new Date()).valueOf()+"&localfile=<%=localfile%>&uploadzip=<%=uploadzip%>",function(data){});
}
} else {
getData();
}
timeout2=setInterval(getData,1000);
});
function getData(){
$.get('/checkProcess.do?date='+(new Date()).valueOf(),function(res){
//var backuppath = $("#backuppath").val();
var pro = res.checkProcess;
var proMessage = res.proMessage;
if(proMessage=="canUpgradeOrNot") {
window.location.href="/updateclient/skippackage.jsp";
clearInterval(timeout2);
return;
} else if(proMessage=="cannotUpgrade") {
window.location.href="/updateclient/error.jsp?type=package";
clearInterval(timeout2);
return;
} else if(proMessage=="canNotUpgradeCheck") {
window.location.href="/updateclient/keyCheck.jsp";
clearInterval(timeout2);
return;
} else if(proMessage=="canNotUpgradeClassbean") {
window.location.href="/updateclient/error.jsp?type=classbean";
clearInterval(timeout2);
return;
}
if(pro == "0") {
$("#message").html("正在解压升级包...");
return;
} else if(pro == "1") {
$("#message").html("正在进行文件对比...");
return;
} else if(pro == "2") {
$("#message").html("正在进行跳包检查...");
return;
} else if(pro == "3") {
$("#message").html("升级包检查完成...");
window.location.href="/updateclient/upgradefiles.jsp";
return;
}
});
}
function refresh() {
getData();
}
$(document).ready(function(){
startMonitorMousedDown();
});
var monitorMousedDown = true;//对鼠标点击事件进行监控
var hasPrompt = false;//提示正在升级 只有在第一次离开页面并点击才会提示
function startMonitorMousedDown(){
$(window.document).mouseout(function(e){
var xx = e.originalEvent.x || e.originalEvent.layerX || 0;
var yy = e.originalEvent.y || e.originalEvent.layerY || 0;
if(!hasPrompt && (xx <= 0 || yy <= 0)) {
monitorMousedDown = true;
} else {
monitorMousedDown = false;
}
});
$(top.document).mousedown(function(e){
if(monitorMousedDown) {
monitorMousedDown = false;
top.Dialog.confirm("系统正在升级,请确认是否离开升级页面?如果确认离开,请点击“确定”并再次点击目标菜单。",
function(){
monitorMousedDown = false;
hasPrompt = true;
$(top.document).unbind('mousedown',this);
},
function(){
monitorMousedDown = true;
hasPrompt = false;
}
);
}
});
}
</script>
</head>
<%
String message = Util.null2String((String)request.getAttribute("message"));
String titlename="";
%>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<jsp:include page="/updateclient/systeminfo/commonTabHead.jsp?step=2">
<jsp:param name="mouldID" value="upgrade" />
<jsp:param name="navName" value="本地升级" />
</jsp:include>
<table id="topTitle" cellpadding="0" cellspacing="0">
<tr>
<td></td>
<td class="rightSearchSpan" style="text-align:right; width:500px!important">
<input type="button" value="刷新" class="e8_btn_top" onclick="refresh()"/>
</td>
</tr>
</table>
<%
RCMenu += "{"+"刷新"+",javascript:refresh(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<body>
<div style="width:24%;height:100%;float:left;background:#fcfcfc;">
<jsp:include page="step.jsp"></jsp:include>
</div>
<div style="width:75%;height:100%;float:right">
<div style="height:380px;">
<div style="height:370px;width:100%;float:right;margin-top:10px;">
<div style="height:100%;width:100%;margin-left:-10px;">
<div style="margin-top:10px;text-align: center;" >
<img src="/images/upgrade.gif"/>
</div>
<div id="message" style="margin-top:10px;height:60px;text-align: center;line-height:60px;font-size: 18px;" >
正在进行升级解压与升级包验证,请稍后...
</div>
</div>
</div>
</div>
</div>
<div>
</div>
</body>
</html>