<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>私塾家后台管理系统</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="icon" href="/favicon.ico" th:href="@{/favicon.ico}" type="image/x-icon">
<link rel="shortcut icon" href="/favicon.ico" th:href="@{/favicon.ico}" type="image/x-icon" />

<link href="sys/css/bootstrap.min.css" th:href="@{/static/sys/css/bootstrap.min.css}" rel="stylesheet"/>
<link href="sys/css/camera.css" th:href="@{/static/sys/css/camera.css}" rel="stylesheet"/>
<link href="sys/css/bootstrap-responsive.min.css" th:href="@{/static/sys/css/bootstrap-responsive.min.css}" rel="stylesheet"/>
<link href="sys/css/matrix-login.css" th:href="@{/static/sys/css/matrix-login.css}" rel="stylesheet"/>
<link href="sys/css/font-awesome.min.css" th:href="@{/static/sys/css/font-awesome.min.css}" rel="stylesheet"/>
<body>
<body>

	<div
		style="width:100%;text-align: center;margin: 0 auto;position: absolute;">
		<div id="loginbox">
			<form th:action="${#httpServletRequest.contextPath}+'/login/login'" method="post" name="loginForm"
				id="loginForm">
				<div class="control-group normal_text">
					<h3>
						<img th:src="@{/static/sys/images/logo.png}" alt="Logo" />
					</h3>
				</div>
				<div class="control-group">
					<div class="controls">
						<div class="main_input_box">
							<span class="add-on bg_lg">
							<i><img height="37" th:src="@{/static/sys/images/user.png}" /></i>
							</span><input type="text" name="loginname" id="loginname" value="" placeholder="请输入用户名" />
						</div>
					</div>
				</div>
				<div class="control-group">
					<div class="controls">
						<div class="main_input_box">
							<span class="add-on bg_ly">
							<i><img height="37" th:src="@{/static/sys/images/suo.png}" /></i>
							</span><input type="password" name="password" id="password" placeholder="请输入密码" value="" />
						</div>
					</div>
				</div>
				<div style="float:right;padding-right:10%;">
					<div style="float: left;margin-top:3px;margin-right:2px;">
						<font color="white">记住密码</font>
					</div>
					<div style="float: left;">
						<input name="form-field-checkbox" id="saveid" type="checkbox"
							onclick="savePaw();" style="padding-top:0px;" />
					</div>
				</div>
				<div class="form-actions">
					<div style="width:86%;padding-left:8%;">

						<div style="float: left;">
							<i><img th:src="@{/static/sys/images/yan.png}" /></i>
						</div>
						<div style="width:25%; float: left;" class="codediv" >
							<input type="text" name="captcha" id="code" class="login_code"
								style=" width:68%;height:16px; padding-top:0px;" />
						</div>
						<div style="float: left;">
							<i><img style="height:22px;" id="kaptcha" alt="点击更换"
								title="点击更换" th:src="${#httpServletRequest.contextPath}+'/kaptcha.jpg'" /></i>
						</div>
						<span class="pull-right" style="padding-right:3%;"><a
							href="javascript:quxiao();" class="btn btn-success">取消</a></span> <span
							class="pull-right"><a onclick="severCheck();"
							class="flip-link btn btn-info" id="to-recover">登录</a></span>

					</div>
				</div>

			</form>


			<div class="controls">
				<div class="main_input_box">
					<font color="white"><span id="nameerr">Copyright © 指点教育
							2020</span></font>
				</div>
			</div>
		</div>
	</div>
	<div id="templatemo_banner_slide" class="container_wapper">
		<div class="camera_wrap camera_emboss" id="camera_slide">
			<div th:data-src="${imgUrl}+'/resources/images/banner_slide_01.jpg'"></div>
			<div th:data-src="${imgUrl}+'/resources/images/banner_slide_02.jpg'"></div>
			<div th:data-src="${imgUrl}+'/resources/images/banner_slide_03.jpg'"></div>
		</div>
		<!-- #camera_wrap_3 -->
	</div>

	<script>
		if (window != top) {
			top.location.href = location.href;
		}
	</script>
	

<script src="js/jquery-2.2.4.min.js" th:src="@{/static/js/jquery-2.2.4.min.js}"></script>
<script src="sys/js/bootstrap.min.js" th:src="@{/static/sys/js/bootstrap.min.js}"></script>
<script src="sys/js/jquery-1.7.2.js" th:src="@{/static/sys/js/jquery-1.7.2.js}"></script>
<script src="sys/js/jquery.easing.1.3.js" th:src="@{/static/sys/js/jquery.easing.1.3.js}"></script>
<script src="sys/js/jquery.mobile.customized.min.js" th:src="@{/static/sys/js/jquery.mobile.customized.min.js}"></script>
<script src="sys/js/camera.min.js" th:src="@{/static/sys/js/camera.min.js}"></script>
<script src="sys/js/templatemo_script.js" th:src="@{/static/sys/js/templatemo_script.js}"></script>
<script src="sys/js/jquery.tips.js" th:src="@{/static/sys/js/jquery.tips.js}"></script>
<script src="js/jquery.cookie.js" th:src="@{/static/js/jquery.cookie.js}"></script> 
<script type="text/javascript">
$(function() {
	$('#kaptcha').click(function() {
		$("#kaptcha").hide().attr('src','[[${#httpServletRequest.contextPath}]]/kaptcha.jpg?'+ Math.floor(Math.random() * 100)).fadeIn();
	});
});
$(document).keyup(function(event) {
	if (event.keyCode == 13) {
		$("#to-recover").trigger("click");
	}
});
//服务器校验
function severCheck(){
	if(check()){
		document.loginForm.submit();
	}
}

var error ='[[${error}]]';
if(error !=''){
	$("#loginbox").tips({
		side : 1,
		msg : error,
		bg : '#AE81FF',
		time : 5
	});
}
//客户端校验
function check() {

	if ($("#loginname").val() == "") {

		$("#loginname").tips({
			side : 2,
			msg : '用户名不得为空',
			bg : '#AE81FF',
			time : 3
		});

		$("#loginname").focus();
		return false;
	} else {
		$("#loginname").val(jQuery.trim($('#loginname').val()));
	}

	if ($("#password").val() == "") {

		$("#password").tips({
			side : 2,
			msg : '密码不得为空',
			bg : '#AE81FF',
			time : 3
		});

		$("#password").focus();
		return false;
	}
	if ($("#code").val() == "") {

		$("#code").tips({
			side : 1,
			msg : '验证码不得为空',
			bg : '#AE81FF',
			time : 3
		});

		$("#code").focus();
		return false;
	}

	$("#loginbox").tips({
		side : 1,
		msg : '正在登录 , 请稍后 ...',
		bg : '#68B500',
		time : 10
	});

	return true;
}
function quxiao() {
	$("#loginname").val('');
	$("#password").val('');
}
</script>
	

</body>
</html>





