InPluginLicense.jsp
6.91 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="weaver.general.*" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.hrm.*" %>
<%@ page import="weaver.systeminfo.*" %>
<jsp:useBean id="PluginLicense" class="weaver.license.PluginLicenseForInterface" scope="page" />
<%
response.setHeader("cache-control", "no-cache");
response.setHeader("pragma", "no-cache");
response.setHeader("expires", "Mon 1 Jan 1990 00:00:00 GMT");
%>
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT language="javascript" src="/js/weaver_wev8.js"></script>
</head>
<%
User user = HrmUserVarify.getUser (request , response) ;
String curskin = (String)session.getAttribute("SESSION_CURRENT_SKIN");
String type=request.getParameter("type"); //type 表示插件种类 mobile代表手机版
String message = Util.null2String(request.getParameter("message")) ;
String code = Util.null2String(request.getParameter("code")) ;
String imagefilename = "/images/hdSystem_wev8.gif";
String titlename = "授权信息 - Mobile License提交" ;
String needfav ="1";
String needhelp ="";
int isIncludeToptitle = 1;
Map license = PluginLicense.getLicenseInfo(type);
String licenseCode = (String)license.get("licensecode");
//companyname=Util.toScreen(companyname,7);
%>
<BODY>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<FORM id="codeform" style="MARGIN-TOP: 0px" name=frmMain action="PluginLicenseOperation.jsp" method=post onsubmit="return checkcode()" enctype="multipart/form-data">
<input type="hidden" name="type" value="<%=type%>">
<table width=100% height=100% border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="10">
<col width="">
<col width="10">
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td ></td>
<td valign="top">
<TABLE class=Shadow>
<tr>
<td valign="top">
<div>
<BUTTON class=btn id=btnSave accessKey=S name=btnSave type=submit><U>S</U>提交</BUTTON>
</div><br>
<TABLE class=ViewForm>
<COLGROUP><COL width="10%"> <COL width="80%"><TBODY>
<TR class=Title>
<TH colSpan=2>MOBILE LICENSE提交</TH>
</TR>
<TR class=Spacing>
<TD class=Line1 colSpan=2></TD>
</TR>
<tr>
<td>验证码:</td>
<td class=Field><input class="InputStyle" type=password id=code name=code maxlength=16 size=16 onchange='checkinput("code","codeimage")'><SPAN id=codeimage><IMG src="/images/BacoError_wev8.gif" align=absMiddle></SPAN><a href="\system\ModifyCode.jsp">更改验证码</a></td>
</tr>
<TR><TD class=Line colspan=2></TD></TR>
<tr>
<td>license文件:</td>
<td class=Field><input class="InputStyle" type=file id="license" name=license size=50 onchange='checkinput("license","licenseimage")'><SPAN id=licenseimage><IMG src="/images/BacoError_wev8.gif" align=absMiddle></td>
</tr>
<TR><TD class=Line colspan=2></TD></TR>
</TBODY>
</TABLE>
<br>
<br>
<DIV>
识别码: <span class=fontred><%=licenseCode%></span>
<br><br>
提 示: 如果还没有<span class=fontred>识别码</span>,请先访问手机版以便生成<span class=fontred>识别码</span><br><br>请将<span class=fontred>公司名称</span>及<span class=fontred>识别码</span>提交给软件供应商,以获取License
</DIV>
<%if(!message.equals("")){%>
<TABLE class=ViewForm>
<COLGROUP> <COL width="10%"> <COL width="80%"><TBODY>
<br>
<br>
<br>
<tr class=Title><TH colSpan=2>提交反馈信息</TH></tr>
<TR class=Spacing>
<TD class=Line1 colSpan=2></TD>
</TR>
</TBODY>
</TABLE>
<DIV class=fontred>
<%
//message=0 表示License信息错误;message=1 表示成功;message=2 表示数据库连接或者执行出错;message=3 表示License文件上传出错;
//message=4 表示License信息错误,License过期;message=5 表示License信息错误,注册用户数大于License申请人数;message=6 表示选择的License文件不正确
if(message.equals("1")){
message=" Success ! " ;
message+="";
}else if(message.equals("0")){
message="License信息错误,请重新启动Resin尝试,并且检查License是否正确!<br>";
message+="License message error,please try to restart Resin and check if the License is correct!";
}else if(message.equals("2")){
message="数据库连接或者执行失败,请按下列步骤检查:1.检查数据库服务器是否正常;2.检查数据库驱动包是否存在;3.检查weaver.properies配置信息是否正确!<br>";
message+="Failed to Connect Data Server,please check by step as below:1.checking the Data Server is OK;2.checking the SQL driver is exist;<br>";
message+="3.checking the message of the file 'weaver.properies' is right!";
}else if(message.equals("3")){
message="License文件上传出错!<br>";
message+="License file uploading error!";
}else if(message.equals("4")){
message="License信息错误,License已过期!<br>";
message+="License message error,license is overdue!";
}else if(message.equals("5")){
message="License信息错误,已分配用户数大于License申请人数!<br>";
message+="License message error,the HRMs is larger than the apllied in the license!";
}else if(message.equals("6")){
message="没有选择正确的License文件或者License文件不存在!<br>";
message+="Wrong choosing License file or License file is not exist!";
}
%>
<%=Util.toScreen(message,7,"2")%>
</DIV>
<%}%>
</td>
</tr>
</TABLE>
</td>
<td></td>
</tr>
<tr>
<td height="10" colspan="3"></td>
</tr>
</table>
</FORM>
</BODY>
<script language="javascript">
function check_form(thiswins,items)
{
thiswin = thiswins
items = items + ",";
for(i=1;i<=thiswin.length;i++)
{
tmpname = thiswin.elements[i-1].name;
tmpvalue = thiswin.elements[i-1].value;
if(tmpvalue==null){
continue;
}
while(tmpvalue.indexOf(" ") == 0)
tmpvalue = tmpvalue.substring(1,tmpvalue.length);
if(tmpname!="" &&items.indexOf(tmpname+",")!=-1 && tmpvalue == ""){
alert("必填信息不完整!");
return false;
}
}
return true;
}
function checkcode() {
if(!check_form(codeform,"code,license"))
return false;
return true;
}
</script>
<link type='text/css' rel='stylesheet' href='/wui/theme/ecology7/skins/<%=curskin %>/wui_wev8.css'/>
<SCRIPT language="javascript" src="/js/weaver_wev8.js"></script>
<script language="javascript">
var osVersion = window.navigator.userAgent.split(";")[2];
var osV = osVersion.substr(osVersion.length-3,3);
if (osV >= 6) {
addCssByStyle(" * { font-family:微软雅黑!important;}");
}
function addCssByStyle(cssString){
var doc=document;
var style=doc.createElement("style");
style.setAttribute("type", "text/css");
if(style.styleSheet){// IE
style.styleSheet.cssText = cssString;
} else {// w3c
var cssText = doc.createTextNode(cssString);
style.appendChild(cssText);
}
var heads = doc.getElementsByTagName("head");
if(heads.length) {
heads[0].appendChild(style);
} else {
doc.documentElement.appendChild(style);
}
}
</script>
</HTML>