Blame view

WebRoot/WEB-INF/jsp/system/index/login.jsp 5.04 KB
a9f5da51   孙向锦   更换首页
1
2
3
4
5
6
7
  <!DOCTYPE html>
  <html lang="zh-CN">
    <head>
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <title>中天电子-教育管理系统</title>
ad5081d3   孙向锦   初始化项目
8
  
a9f5da51   孙向锦   更换首页
9
10
11
      <!-- Bootstrap -->
      <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
  	<link href="static/login/style_login.css" rel="stylesheet">
9338b563   孙向锦   添加报表
12
  	
a9f5da51   孙向锦   更换首页
13
14
15
16
17
  	<script src="static/js/jquery-1.7.2.js"></script>
  	<script src="static/login/js/jquery.easing.1.3.js"></script>
  		<script type="text/javascript" src="static/js/jQuery.md5.js"></script>
  	<script type="text/javascript" src="static/js/jquery.tips.js"></script>
  	<script type="text/javascript" src="static/js/jquery.cookie.js"></script>
ad5081d3   孙向锦   初始化项目
18
  
a9f5da51   孙向锦   更换首页
19
20
21
22
23
24
25
26
27
28
29
      <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 -->
      <!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 -->
      <!--[if lt IE 9]>
        <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
        <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
      <![endif]-->
    </head>
    <body>
      <div class="content">
  		<div class="content_t">
  			<img src="static/login/title.png" alt="SunVote"/>
ad5081d3   孙向锦   初始化项目
30
  		</div>
a9f5da51   孙向锦   更换首页
31
32
33
34
35
36
  		<div class="content_b">
  				<div class="form_box">
  			<form action="" method="post" name="loginbox" id="loginbox">
  					<input type="text" name="loginname" id="loginname" value="" placeholder="用户名" />
  					<input type="password" name="password" id="password" placeholder="密   码" value="" />
  					<a href="#" onclick="severCheck();" class="login_btn">登录</a>
ad5081d3   孙向锦   初始化项目
37
  			</form>
ad5081d3   孙向锦   初始化项目
38
  				</div>
ad5081d3   孙向锦   初始化项目
39
  		</div>
ad5081d3   孙向锦   初始化项目
40
  	</div>
ad5081d3   孙向锦   初始化项目
41
  
a9f5da51   孙向锦   更换首页
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
     <script type="text/javascript">
     
     		//客户端校验
  		function check() {
  
  			if ($("#loginname").val() == "") {
  				$("#loginname").tips({
  					side : 2,
  					msg : '用户名不得为空',
  					bg : '#AE81FF',
  					time : 3
  				});
  				showfh();
  				$("#loginname").focus();
  				return false;
  			} else {
  				$("#loginname").val(jQuery.trim($('#loginname').val()));
  			}
  			if ($("#password").val() == "") {
  				$("#password").tips({
  					side : 2,
  					msg : '密码不得为空',
  					bg : '#AE81FF',
  					time : 3
  				});
  				showfh();
  				$("#password").focus();
  				return false;
  			}
  			
  			 $("#loginbox").tips({
  				side : 1,
  				msg : '正在登录 , 请稍后 ...',
  				bg : '#68B500',
  				time : 10
  			}); 
  
  			return true;
  		}
  		
ad5081d3   孙向锦   初始化项目
82
83
84
85
86
  		//服务器校验
  		function severCheck(){
  			if(check()){
  				var loginname = $("#loginname").val();
  				var password = $("#password").val();
81df8ce6   孙向锦   去掉多余的信息
87
  				var code = loginname+";;;"+password+";;;" + $("#code").val();
ad5081d3   孙向锦   初始化项目
88
89
90
91
92
93
94
95
96
  				$.ajax({
  					type: "POST",
  					url: 'login_login',
  			    	data: {KEYDATA:code,tm:new Date().getTime()},
  					dataType:'json',
  					cache: false,
  					success: function(data){
  						if("success" == data.result){
  							saveCookie();
338594c8   孙向锦   添加教师端页面
97
98
99
100
101
  							if(data.teacher != null){
  								window.location.href="main/teacher";
  							}else{
  								window.location.href="main/index";
  							}
ad5081d3   孙向锦   初始化项目
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
  						}else if("usererror" == data.result){
  							$("#loginname").tips({
  								side : 1,
  								msg : "用户名或密码有误",
  								bg : '#FF5080',
  								time : 15
  							});
  							showfh();
  							$("#loginname").focus();
  						}else if("codeerror" == data.result){
  							$("#code").tips({
  								side : 1,
  								msg : "验证码输入有误",
  								bg : '#FF5080',
  								time : 15
  							});
  							showfh();
  							$("#code").focus();
  						}else{
  							$("#loginname").tips({
  								side : 1,
  								msg : "缺少参数",
  								bg : '#FF5080',
  								time : 15
  							});
  							showfh();
  							$("#loginname").focus();
  						}
  					}
  				});
  			}
  		}
a9f5da51   孙向锦   更换首页
134
  		
ad5081d3   孙向锦   初始化项目
135
136
137
138
139
140
141
142
143
144
  		function saveCookie() {
  			if ($("#saveid").attr("checked")) {
  				$.cookie('loginname', $("#loginname").val(), {
  					expires : 7
  				});
  				$.cookie('password', $("#password").val(), {
  					expires : 7
  				});
  			}
  		}
ad5081d3   孙向锦   初始化项目
145
  	</script>
a9f5da51   孙向锦   更换首页
146
147
148
149
  	<script type="text/javascript" src="static/login/js/jquery-1.5.1.min.js"></script>
      <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>   
      <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
      <script src="static/login/js/bootstrap.min.js"></script>
ad5081d3   孙向锦   初始化项目
150
151
152
153
154
155
156
157
158
159
160
161
162
  	<script src="static/js/jquery-1.7.2.js"></script>
  	<script src="static/login/js/jquery.easing.1.3.js"></script>
  	<script src="static/login/js/jquery.mobile.customized.min.js"></script>
  	<script src="static/login/js/camera.min.js"></script>
  	<script src="static/login/js/templatemo_script.js"></script>
  	<script src="static/login/js/ban.js"></script>
  	<script type="text/javascript" src="static/js/jQuery.md5.js"></script>
  	<script type="text/javascript" src="static/js/jquery.tips.js"></script>
  	<script type="text/javascript" src="static/js/jquery.cookie.js"></script>
  	
  	<!-- 软键盘控件start -->
  	<script type="text/javascript" src="static/login/keypad/js/form/keypad.js"></script>
  	<script type="text/javascript" src="static/login/keypad/js/framework.js"></script>
a9f5da51   孙向锦   更换首页
163
    </body>
ad5081d3   孙向锦   初始化项目
164
  </html>