sysLogin.jsp
5.9 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
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
<title>${fns:getConfig('productName')} 登录</title>
<meta name="decorator" content="blank"/>
<style type="text/css">
html, body, table {
background-color: #f5f5f5;
width: 100%;
text-align: center;
}
.form-signin-heading {
font-family: Helvetica, Georgia, Arial, sans-serif, 黑体;
font-size: 36px;
margin-bottom: 20px;
color: #0663a2;
}
.form-signin {
position: relative;
text-align: left;
width: 300px;
padding: 25px 29px 29px;
margin: 0 auto 20px;
background-color: #fff;
border: 1px solid #e5e5e5;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.form-signin .checkbox {
margin-bottom: 10px;
color: #0663a2;
}
.form-signin .input-label {
font-size: 16px;
line-height: 23px;
color: #999;
}
.form-signin .input-block-level {
font-size: 16px;
height: auto;
margin-bottom: 15px;
padding: 7px;
*width: 283px;
*padding-bottom: 0;
_padding: 7px 7px 9px 7px;
}
.form-signin .btn.btn-large {
font-size: 16px;
}
.form-signin #themeSwitch {
position: absolute;
right: 15px;
bottom: 10px;
}
.form-signin div.validateCode {
padding-bottom: 15px;
}
.mid {
vertical-align: middle;
}
.header {
height: 80px;
padding-top: 20px;
}
.alert {
position: relative;
width: 300px;
margin: 0 auto;
*padding-bottom: 0px;
}
label.error {
background: none;
width: 270px;
font-weight: normal;
color: inherit;
margin: 0;
}
</style>
<script type="text/javascript">
$(document).ready(function () {
$("#loginForm").validate({
rules: {
<%--validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}--%>
validateCode: {remote: "${pageContext.request.contextPath}/servlet/ValidateKaptcha"},
jckafzglpt: {required: true,isPwd: true},
},
messages: {
jckafzgl: {required: "请填写用户名."},
jckafzglpt: {required: "请输入密码" },
validateCode: {remote: "验证码不正确.", required: "请填写验证码."}
},
errorLabelContainer: "#messageBox",
errorPlacement: function (error, element) {
error.appendTo($("#loginError").parent());
}
});
});
// jQuery.validator.addMethod("isPwd", function(value, element) {
// return this.optional(element) || /^(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[_.!@#$%^&*()])[\da-zA-Z_.!@#$%^&*()]{8,18}$/.test(value);
// }, "密码需包含字母、数字和特殊字符,长度在8-18之间");
// 如果在框架或在对话框中,则弹出提示并跳转到首页
if (self.frameElement && self.frameElement.tagName == "IFRAME" || $('#left').length > 0 || $('.jbox').length > 0) {
alert('未登录或登录超时。请重新登录,谢谢!');
top.location = "${ctx}";
}
</script>
</head>
<body>
<div class="header">
<div id="messageBox" class="alert alert-error ${empty message ? 'hide' : ''}">
<button data-dismiss="alert" class="close">×</button>
<label id="loginError" class="error">${message}</label>
</div>
</div>
<h1 class="form-signin-heading">${fns:getConfig('productName')}</h1>
<form id="loginForm" class="form-signin" action="${ctx}/login" method="post">
<label class="input-label" for="jckafzgl">登录名</label>
<input type="text" id="jckafzgl" name="jckafzgl" class="input-block-level required" value="${jckafzgl}">
<label class="input-label" for="jckafzglpt">密码</label>
<input type="password" id="jckafzglpt" name="jckafzglpt" class="input-block-level required">
<div class="validateCode">
<label class="input-label mid" for="validateCode">验证码</label>
<sys:validateCode name="validateCode" inputCssStyle="margin-bottom:0;"/>
</div>
<input class="btn btn-large btn-primary" type="submit" value="登 录"/>
<div id="themeSwitch" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown"
href="#">${fns:getDictLabel(cookie.theme.value,'theme','默认主题')}<b class="caret"></b></a>
<ul class="dropdown-menu">
<c:forEach items="${fns:getDictList('theme')}" var="dict">
<li><a href="#"
onclick="location='${pageContext.request.contextPath}/theme/${dict.value}?url='+location.href">${dict.label}</a>
</li>
</c:forEach>
</ul>
<!--[if lte IE 6]
<script type="text/javascript">$('#themeSwitch').hide();</script>
<![endif] -->
</div>
</form>
<div class="footer">
Copyright © ${fns:getConfig('copyrightYear')} <a
href="${pageContext.request.contextPath}${fns:getFrontPath()}">${fns:getConfig('productName')}
</div>
<script src="${ctxStatic}/flash/zoom.min.js" type="text/javascript"></script>
</body>
</html>