-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmanage_teacher.jsp
60 lines (56 loc) · 1.6 KB
/
manage_teacher.jsp
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
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.net.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>青海大学-管理教师信息</title>
<link rel="shortcut icon" href="https://portal-minio.qhu.edu.cn/cms/qhufavicon.png" type="image/x-icon">
<%-- <!-- 加载需要的css文件 --> --%>
<%@ include file="./model/required_css.jsp" %>
<%@ include file="./model/conn_db.jsp" %>
<%! int nav_page=3;int login=0; %>
</head>
<body>
<%
cookie = null;
cookies = request.getCookies();
int judge1=0, judge2=0;
if(cookies!=null){
for(int i=0; i<cookies.length; i++){
cookie = cookies[i];
if(cookie.getName().equals("is_login") && cookie.getValue().equals("1")){
judge1=1;break;
}
}
if(judge1==1){
for(int i=0; i<cookies.length; i++){
cookie = cookies[i];
if(cookie.getName().equals("login_type") && cookie.getValue().equals("1")){
judge2=1;break;
}
}
if(judge2==0){
out.print("<script>alert('您是普通用户,只可进行查询操作!将为您导航至首页');location = 'index.jsp'</script>");
}
}
}
if(judge1==0){
String s="<script> alert('您是普通用户,只可进行查询操作!将为您导航至首页');location = 'index.jsp'</script>";
out.println(s);
}
%>
<div id="index">
<div id="left_holder">
<%@ include file="./model/nav_bar.jsp" %>
</div>
<div id="index_content">
<%@ include file="./model/user_panel.jsp" %>
<div class="content">
<%@ include file="./content/manage_teacher_content.jsp" %>
</div>
</div>
</div>
</body>
</html>