-
学生信息管理系统
-
-
-
-
-
-
-
-
-
-
-
-
学生管理
-
-
-
-
-
- 学号
- 姓名
- 性别
- 出生日期
- 省份
- 民族
- 班级
-
- <%
- String driverClass="com.mysql.jdbc.Driver";
- String url="jdbc:mysql://localhost:3306/db_school";
- String user="root";
- String password="";
- Connection conn;
- try{
- Class.forName(driverClass);
- conn=DriverManager.getConnection(url,user,password);
- Statement stmt=conn.createStatement();
- String sql="select * from tb_student";
- ResultSet rs=stmt.executeQuery(sql);
- while(rs.next()){
- %>
-
- <%=rs.getString("studentNo") %>
- <%=rs.getString("studentName") %>
- <%=rs.getString("sex") %>
- <%=rs.getString("birthday") %>
- <%=rs.getString("native") %>
- <%=rs.getString("nation") %>
- <%=rs.getString("classNo") %>
-
-
- <%
- }
- }
- catch(Exception ex){
- ex.printStackTrace();
- }
- %>
-
-
-
-
-
-
-
-
班级管理
-
-
-
-
- 课室号
- 课室名
- 学院
- 年级
- 人数
-
- <%
- try{
- Class.forName(driverClass);
- conn=DriverManager.getConnection(url,user,password);
- Statement stmt=conn.createStatement();
- String sql="select * from tb_class";
- ResultSet rs=stmt.executeQuery(sql);
- while(rs.next()){
- %>
-
-
- <%=rs.getString("classNo") %>
- <%=rs.getString("className") %>
- <%=rs.getString("department") %>
- <%=rs.getString("grade") %>
- <%=rs.getString("classNum") %>
-
- <%
- }
- }
- catch(Exception ex){
- ex.printStackTrace();
- }
- %>
-
-
-
-
-
-
-
课程管理
-
-
-
-
- 课程编号
- 课程名称
- 学分
- 课时
- 学期
- 先行课程
-
- <%
- try{
- Class.forName(driverClass);
- conn=DriverManager.getConnection(url,user,password);
- Statement stmt=conn.createStatement();
- String sql="select * from tb_course";
- ResultSet rs=stmt.executeQuery(sql);
- while(rs.next()){
- %>
-
- <%=rs.getString("courseNo") %>
- <%=rs.getString("courseName") %>
- <%=rs.getString("credit") %>
- <%=rs.getString("courseHour") %>
- <%=rs.getString("term") %>
- <%=rs.getString("priorCourse") %>
-
- <%
- }
- }
- catch(Exception ex){
- ex.printStackTrace();
- }
- %>
-
-
-
-
-
-
-
成绩管理
-
-
-
-
- 姓名
- 课程名称
- 成绩
-
- <%
- try{
- Class.forName(driverClass);
- conn=DriverManager.getConnection(url,user,password);
- Statement stmt=conn.createStatement();
- String sql="select * from tb_score AS g,tb_student AS s ,tb_course AS c where s.studentNo=g.studentNo AND g.courseNo=c.courseNo";
- ResultSet rs=stmt.executeQuery(sql);
- while(rs.next()){
- %>
-
- <%=rs.getString("studentName") %>
- <%=rs.getString("courseName") %>
- <%=rs.getString("score") %>
-
- <%
- }
- }
- catch(Exception ex){
- ex.printStackTrace();
- }
- %>
-
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/WebRoot/module/footer.jsp b/WebRoot/module/footer.jsp
new file mode 100644
index 0000000..b2a2681
--- /dev/null
+++ b/WebRoot/module/footer.jsp
@@ -0,0 +1,33 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/module/sidebar.jsp b/WebRoot/module/sidebar.jsp
new file mode 100644
index 0000000..6ddbdb0
--- /dev/null
+++ b/WebRoot/module/sidebar.jsp
@@ -0,0 +1,70 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+
+
+
+
+
test
+
+
+
+
+
+
+
+
+
+
+
+
<% out.println(user1);%>
+
<% out.println(vipuser+" "+adminuser);%>
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/module/top.jsp b/WebRoot/module/top.jsp
new file mode 100644
index 0000000..4df1e90
--- /dev/null
+++ b/WebRoot/module/top.jsp
@@ -0,0 +1,89 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<%
+ Object vipuser = session.getAttribute("VIPuser");
+ Object adminuser = session.getAttribute("Adminuser");
+ Object user1 = session.getAttribute("actualuser");
+ %>
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/show_admin.jsp b/WebRoot/show_admin.jsp
new file mode 100644
index 0000000..1bee7f0
--- /dev/null
+++ b/WebRoot/show_admin.jsp
@@ -0,0 +1,107 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<%@page import="java.sql.Connection"%>
+<%@page import="java.sql.*"%>
+<%@page import="java.sql.DriverManager"%>
+
+
+
+
+
+
+
查看管理员
+
+
+
+
+
+
+
+ <%@ include file="/module/top.jsp"%>
+
+
查看管理员
+
+ <%@ include file="module/sidebar.jsp"%>
+
+
+
+
+
管理员档案管理
+
+
+
+
+
+ 管理员号
+ 管理员名
+ 性别
+ 岗位
+
+
+ <%
+ String driverClass = "com.mysql.jdbc.Driver";
+ String url = "jdbc:mysql://localhost:3306/db_school";
+ String user = "root";
+ String password = "";
+ ResultSet rs = null;
+ Connection conn = null;
+ PreparedStatement sql = null;
+ try {
+ Class.forName(driverClass);
+ conn = DriverManager.getConnection(url, user, password);
+ Statement stmt = conn.createStatement();
+ sql = conn.prepareStatement("select * from adminstrator_record");
+ rs = sql.executeQuery();
+ while (rs.next()) {
+ %>
+
+ <%=rs.getString("AdminNo")%>
+ <%=rs.getString("AdminName")%>
+ <%=rs.getString("AdminSex")%>
+ <%=rs.getString("AdminJob")%>
+
+
+ <%
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ %>
+ <%
+ sql.close();
+ rs.close();
+ conn.close();
+ %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WebRoot/show_adminjob.jsp b/WebRoot/show_adminjob.jsp
new file mode 100644
index 0000000..80fdfd5
--- /dev/null
+++ b/WebRoot/show_adminjob.jsp
@@ -0,0 +1,115 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<%@page import="java.sql.Connection"%>
+<%@page import="java.sql.*"%>
+<%@page import="java.sql.DriverManager"%>
+
+
+
+