2021级《软件工程》
开发技能测试试卷(180分钟)
河北宏志大学学生成绩管理系统
(卷面成绩40分)
河北宏志大学学生成绩管理系统
2023.6.10
1、项目需求:
学生管理是各大院校的管理工作中尤为重视的一项工作,它一直以来是学校管理的一项重要的衡量指标。学生管理系统的应用解决了学校日常学生管理工作中的信息量大、数据难以统计、数据更新困难等问题。河北宏志大学为了提高工作效率,及时掌握学生的学习成绩、个人基本情况等一系列数据信息,要求开发学生成绩管理系统。
2.系统要求与功能设计
2.1 页面要求
(1)通过浏览器查看,能适应常用分辨率;(1分)
(2)布局合理、结构清晰、页面完整;(1分)
(3)网站页面整体风格统一;(1分)
(4)首页为用户登录页面,不同角色用户登录后,进入相应的功能页,要求密码在数据库中加密;(4分)
(5)学生功能页:学生查看、修改基本信息,查询个人所有的考试科目的成绩;
(6)教师功能页:教师查看、修改基本信息,录入、修改个人所教授考试科目考试成绩,可以实现汇总查询;
(7)管理员功能页:用户注册、用户权限管理;
(8)对每页中的查询结果推荐采用分页显示。
图1 学生成绩管理系统功能结构图
2.2 功能要求
(1)设置年级参数:增加、删除、修改年级参数;(1分)
(2)设置班级参数:增加、删除、修改班级参数;(1分)
(3)设置考试科目参数:增加、删除、修改考试科目参数;(1分)
(4)学生基本信息维护:增加、删除、修改学生基本信息;(1分)
(5)教师基本信息维护:增加、删除、修改教师基本信息;(1分)
(6)考试成绩维护:教师用户登录后选择考试科目,选择所教班级依次录入考试成绩;(3分)
(7)基本成绩查询:学生用户登录后,可查询所有所学科目的成绩,仅限于查询本人成绩;(2分)
(8)成绩信息查询:教师用户可依据各种条件查询所教班级的学生成绩信息;(至少要求提供两种条件查询)(2分)
(9)汇总查询:管理员可以依据条件汇总统计各个科目不及格(分数低于60分)和成绩优秀(分数高于89分)的学生人数;(3分)
(12)用户管理:管理员可以查询用户、批准新用户、暂停用户、为用户赋予角色,普通用户可以修改用户资料。(2分)
2.1,2.2 评分标准:以上各项分值为页面要求和功能要求,各项分值合计(24分);除此以外设计出合理的数据库和数据表(3分),数据库连接正常(2分),设计出用户权限管理(6分)。
2.3 网站发布
(1)网站制作完成后需指定一台机器作为服务器发布。
(2)在其他主机上可正常浏览。
评分标准:能够在Tomcat服务器中正确部署(3分),其它主机可正常浏览(2分);
2.4 注意事项
(1)网站首页(登录页) 统一使用index.*命名。(*表示源文件的后缀名)。
<%@page import="DBUtil.Data"%>
<%@page import="java.sql.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>注册登录</title>
</head>
<body>
<%-- Code for registration form --%>
<h2>注册</h2>
<form action="register.jsp" method="POST">
<label for="reg-username">用户名:</label>
<input type="text" id="reg-username" name="reg-username" required>
<br>
<label for="reg-password">密码:</label>
<input type="password" id="reg-password" name="reg-password" required>
<br>
<label for="reg-pid">身份:</label>
<input type="text" id="reg-pid" name="reg-pid" required>
<br>
<input type="submit" value="Register">
</form>
<%-- Code for login form --%>
<h2>登录</h2>
<form action="login.jsp" method="POST">
<label for="login-username">用户:</label>
<input type="text" id="login-username" name="login-username" required>
<br>
<label for="login-password">密码:</label>
<input type="password" id="login-password" name="login-password" required>
<br>
<input type="submit" value="Login">
</form>
<%-- Code for handling registration form submission --%>
<% if (request.getParameter("reg-username") != null && request.getParameter("reg-password") != null && request.getParameter("reg-pid") != null) { %>
<%-- Extract the form data --%>
<% String regUsername = request.getParameter("reg-username"); %>
<% String regPassword = request.getParameter("reg-password"); %>
<% String regPid = request.getParameter("reg-pid"); %>
<%-- Use the provided Java method to add the user --%>
<% if (adduser(regUsername, regPassword, regPid)) { %>
<p>Registration successful!</p>
<% } else { %>
<p>Registration failed. Please try again.</p>
<% } %>
<% } %>
<%-- Code for handling login form submission --%>
<% if (request.getParameter("login-username") != null && request.getParameter("login-password") != null) { %>
<%-- Extract the form data --%>
<% String loginUsername = request.getParameter("login-username"); %>
<% String loginPassword = request.getParameter("login-password"); %>
<%-- Use the provided Java method to check the user's credentials --%>
<% if (login(loginUsername, loginPassword)) { %>
<p>Login successful!</p>
<% } else { %>
<p>Login failed. Please try again.</p>
<% } %>
<% } %>
</body>
</html>
<%@page import="DBUtil.Data"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>录入成绩</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<form action="gaddjudge.jsp" method="get">
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br>
<br>
<br> 学号<input type="text" name="id" /><br>
<br> 姓名<input type="text" name="name" /><br>
<br>课程<input type="text" name="kecheng" /><br>
<br>分数<input type="text" name="fenshu" /><br>
<br><input type="submit" value="提交" />
<input type="reset" value="重置" /> <br>
<br> <input type="button" value="注册" onclick="location.href='login.jsp'" /> <br>
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String id=(String)request.getParameter("id");
String name=(String)request.getParameter("name");
String kecheng=(String)request.getParameter("kecheng");
String fenshu=(String)request.getParameter("fenshu");
util.addgrade(id, name, kecheng, fenshu);
out.print("<script language='javaScript'> alert('添加成功');</script>");
response.setHeader("refresh", "0;url=show.jsp");
%>
</body>
</html>
<%@page import="DBUtil.Data"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改页面</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<form action="grevisejudge.jsp" method="get">
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br> 输入要修改的课程<input type="text" name="kecheng" /><br>
<br><input type="submit" value="提交" />
<input type="reset" value="重置" /> <br>
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</form>
</body>
</html>
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改成绩</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String kecheng=(String)request.getParameter("kecheng");
if(kecheng==""){
out.print("<script language='javaScript'> alert('输入为空'); window.history.back(-1); </script>");
}
else{
%>
<table border="1"style="text-align:center;">
<tr>
<td align="center" width=10%>学号</td>
<td align="center" width=10%>姓名</td>
<td align="center" width=10%>课程</td>
<td align="center" width=10%>分数</td>
<td align="center" width=3%>修改</td>
</tr>
<%
Connection connection = util.getConnection();
PreparedStatement preparedStatement=null;
ResultSet rs=null;
try {
String sql = "select * from grade";
preparedStatement=connection.prepareStatement(sql);
rs=preparedStatement.executeQuery();
while(rs.next()){
if(kecheng.equals(rs.getObject(3)))
{
%>
<tr>
<td align="center"><%=rs.getObject(1) %></td>
<td align="center"><%=rs.getObject(2) %></td>
<td align="center"><%=rs.getObject(3) %></td>
<td align="center"><%=rs.getObject(4) %></td>
<td align="center"><a style="color:blue" href='grevisejudge2.jsp?kecheng0=<%=rs.getObject(3) %>'>修改</a> </td>
</tr>
<%
}
}
} catch (SQLException e) {
e.printStackTrace();
}finally{
util.close(rs);
util.close(preparedStatement);
util.close(connection);
}
%>
</table>
<%
}
%>
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</body>
</html>
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String kecheng0=(String)request.getParameter("kecheng0");
session.setAttribute("kecheng0",kecheng0);
%>
<table border="1"style="text-align:center;">
<tr>
<td align="center" width=10%>学号</td>
<td align="center" width=10%>姓名</td>
<td align="center" width=10%>课程</td>
<td align="center" width=10%>分数</td>
</tr>
<%
Connection connection = util.getConnection();
PreparedStatement preparedStatement=null;
ResultSet rs=null;
try {
String sql = "select * from grade";
preparedStatement=connection.prepareStatement(sql);
rs=preparedStatement.executeQuery();
while(rs.next()){
if(kecheng0.equals(rs.getObject(3)))
{
%>
<tr>
<td align="center"><%=rs.getObject(1) %></td>
<td align="center"><%=rs.getObject(2) %></td>
<td align="center"><%=rs.getObject(3) %></td>
<td align="center"><%=rs.getObject(4) %></td>
</tr>
<%
}
}
} catch (SQLException e) {
e.printStackTrace();
}finally{
util.close(rs);
util.close(preparedStatement);
util.close(connection);
}
%>
</table>
<form action="grevisejudge3.jsp" method="get">
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br>
<br>
修改成绩信息
<br>学号<input type="text" name="id" /><br>
<br>姓名<input type="text" name="name" />
<br>课程<input type="text" name="kecheng" />
<br>分数<input type="text" name="fenshu" /><br>
<br><input type="submit" value="提交" />
<input type="reset" value="重置" /> <br>
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String kecheng0=(String)session.getAttribute("kecheng0");
String kecheng=(String)request.getParameter("kecheng");
String fenshu=(String)request.getParameter("fenshu");
String id=(String)request.getParameter("id");
String name=(String)request.getParameter("name");
if(id==""||name==""||kecheng==""||fenshu=="")
{
out.print("<script language='javaScript'> alert('输入为空');window.history.back(-1);</script>");
}
else
{
util.revisegrade(kecheng0,kecheng,id,name,fenshu);
out.print("<script language='javaScript'> alert('修改成功');</script>");
response.setHeader("refresh", "0;url=grevise.jsp");
}
%>
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</body>
</html>
<%@page import="DBUtil.Data"%>
<%@page import="java.sql.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>成绩查询系统</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<%
int row=0;
int zongye=0;
String name = request.getParameter("name");
String id = request.getParameter("id");
String kecheng = request.getParameter("kecheng");
String fenshu = request.getParameter("fenshu");
if (name == "" || name == null) {
name = "";
}
if (id == "" || id == null) {
id = "";
}
if (kecheng == "" || kecheng == null) {
kecheng = "";
}
String yema0 = request.getParameter("yema");
int yema = 0;
if (yema0 == "0"||yema0 == "" || yema0 == null) {
yema = 1;
} else {
yema = Integer.parseInt(yema0);
}
String shuliang0 = request.getParameter("shuliang");
int shuliang = 0;
if (shuliang0 == "" || shuliang0 == null) {
shuliang = 10;
} else {
shuliang = Integer.parseInt(shuliang0);
}
%>
<div id="app-header" align="center">
<img src="LOGO.png" style="height: 28px; margin-bottom: 10px"> <span
style="font-size: 35px; color: #1c4786; font-family: 宋体; font-weight: bold"> 成绩查询</span>
</div>
<form action="gsearch.jsp">
<div id="title" align="center" style="color: blue; font-family: 黑体; font-weight: bold">
姓名:<input type="text" name="name" size="20" value="<%=name %>" />
学号:<input type="text" name="id" size="20" value="<%=id %>" />
课程:<input type="text" name="kecheng" size="20" value="<%=kecheng %>" />
<input type="submit" value="搜索" />
</div>
<div id="jieguo" style="float: left; width: 100%">
<table border="1" style="table-layout: fixed;" width="100%" align="center" vertical-align="middle" frame=void rules=none>
<tr
style="text-align: center; color: black; font-family: 黑体; font-size: 25px">
<td align="center" width=40%>姓名</td>
<td align="center" width=30%>学号</td>
<td align="center" width=20%>课程</td>
<td align="center" width=20%>分数</td>
</tr>
<%
try {
Connection connection = Data.getConnection1();
PreparedStatement preparedStatement = null;
ResultSet rs = null;
String sql = " select id , name , kecheng , fenshu from grade where name like ? and id like ? and kecheng like ?order by fenshu desc";
preparedStatement = connection.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
preparedStatement.setString(1, "%" + name + "%");
preparedStatement.setString(2, "%" + id + "%");
preparedStatement.setString(3, "%" + kecheng + "%");
preparedStatement.setString(4, "%" + fenshu + "%");
rs = preparedStatement.executeQuery();
//out.write(""+(yema - 1));
rs.absolute((yema - 1) * shuliang);
for (int i = 0; i < shuliang; i++) {
if(!rs.next())
break;
%>
<tr>
<style>
a:link {color: blue}
a:visited {color: blue}
a{ text-decoration:none; }
a:hover{ color:#FF0000 }
a:active {color: purple}
</style>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis" align="left" ><a href="gsearch2.jsp?id=<%=rs.getObject("id")%>" ><%=rs.getObject("kecheng")%></a></td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis" align="center"><%=rs.getObject("name")%></td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis" align="center"><%=rs.getObject("fenshu")%></td>
</tr>
<%
}
rs.last();
row=rs.getRow();
if(row%shuliang==0)
zongye=row/shuliang;
else
zongye=row/shuliang+1;
//out.print(row);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
%>
</table>
</div>
<div id="app-header" align="center">
<%
String str1="<input type=\"button\" value=\"";
String str2="\" onclick=\"location.href='gsearch.jsp?name="+name+"&id="+id+"&kecheng="+kecheng+"&yema=";
String str3="'\" />";
if(yema!=1)
out.print(str1+"<"+str2+(yema-1)+str3);
if(yema>3&&yema<zongye-3){
out.print(str1+"1"+str2+"1"+str3);
out.print("...");
out.print(str1+(yema-1)+str2+(yema-1)+str3);
out.print(str1+(yema)+str2+(yema)+str3);
out.print(str1+(yema+1)+str2+(yema+1)+str3);
out.print("...");
out.print(str1+zongye+str2+zongye+str3);
}
else if(yema<=3&&yema<zongye-3){
out.print(str1+"1"+str2+"1"+str3);
out.print(str1+"2"+str2+"2"+str3);
out.print(str1+"3"+str2+"3"+str3);
out.print(str1+"4"+str2+"4"+str3);
out.print("...");
out.print(str1+zongye+str2+zongye+str3);
}
else if(yema>3&&yema>=zongye-3){
out.print(str1+"1"+str2+"1"+str3);
out.print("...");
for(int i=yema-1;i<=zongye;i++){
out.print(str1+i+str2+i+str3);
}
}
else if(yema<=3&&yema>=zongye-3){
for(int i=1;i<=zongye;i++){
out.print(str1+i+str2+i+str3);
}
}
if(yema!=zongye)
out.print(str1+">"+str2+(yema+1)+str3);
out.print(" 共"+row+"条");
out.print(" 共"+zongye+"页");
out.print(" 到第<input type=\"text\" name=\"yema\" size=\"10\" value=\""+yema+"\" />页");
%>
<!-- <select name="shuliang"lay-ignore=""></option><option value="10">10 条/页</option></select>
-->
<%
out.print("<input type=\"submit\" value=\"确定\" /> ");
%>
</div>
</form>
<div class="layui-col-md12 layui-col-sm12 layui-col-xs12">
<!--background: #393E46;-->
<!--<div class="layui-row">-->
<div style="background: #393E46; height: 70px;position: relative; margin-top: 20px" align="center">
<div style="top: 27px ; position: relative; align-content: center">
<span style="font-family: 微软雅黑;font-size: 15px; color:#f2f2f2; align-content: center;">
<pre>2023.4.10 20214001 @信2105-3班张若谷</pre>
</span>
</div>
</div>
<!--</div>-->
</div>
</body>
</html>
<%@page import="DBUtil.Data"%>
<%@page import="java.sql.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>科技政策查询系统</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<%
String kecheng = request.getParameter("kecheng");
Connection connection = Data.getConnection1();
PreparedStatement preparedStatement = null;
ResultSet rs = null;
String sql = " select kecheng,id,name,fenshu from grade where kecheng=? ";
preparedStatement = connection.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
preparedStatement.setString(3, kecheng);
rs = preparedStatement.executeQuery();
rs.next();
out.print("<h1>");
out.print(rs.getObject("id"));
out.print("</h1>");
out.print(rs.getObject("fenshu"));
%>
<button onclick="javascript:history.back(-1);">返回上一页</button>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>成绩管理系统</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<p style="text-align:center;color:white;font-family:宋体; font-size:20px">
<br> 选择功能: <input type="button" value="管理员" onclick="location.href='admin.jsp'" />
<input type="button" value="教师" onclick="location.href='tea.jsp'" />
<input type="button" value="学生" onclick="location.href='stu.jsp'" />
<br>
</p>
</body>
</html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>登录</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}
h1 {
margin-top:25px;
font-size: 36px;
text-transform: uppercase;
color: #fff;
background: linear-gradient(to right, #0099ff, #ff9900);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
form {
margin-top: 40px;
display: inline-block;
text-align: left;
background: #fff;
border-radius: 10px;
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
padding: 20px;
}
input[type="text"],
input[type="password"] {
width: 100%;
padding: 10px;
margin-top: 10px;
margin-bottom: 20px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 16px;
outline: none;
}
input[type="submit"] {
background: linear-gradient(to right, #0099ff, #ff9900);
color: #fff;
border: none;
border-radius: 5px;
padding: 10px 20px;
cursor: pointer;
font-size: 18px;
}
input[type="submit"]:hover {
background: linear-gradient(to right, #ff9900, #0099ff);
}
</style>
</head>
<body>
<header>
<h1>登录界面</h1>
</header>
<section>
<form action="index.jsp" method="post">
<input type="text" placeholder="请输入用户名" name="name">
<input type="password" placeholder="请输入密码" name="pwd">
<input type="submit" value="登录">
</form>
</section>
</body>
</html>
<%@page import="DBUtil.Data"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>jia</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<form action="saddjudge.jsp" method="get">
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br>
<br>
<br> 学号<input type="text" name="id" /><br>
<br> 姓名<input type="text" name="name" /><br>
<br>专业<input type="text" name="zhuanye" /><br>
<br>年级<input type="text" name="nianji" /><br>
<br>班级<input type="text" name="banji" /><br>
<br><input type="submit" value="提交" />
<input type="reset" value="重置" /> <br>
<br> <input type="button" value="注册" onclick="location.href='login.jsp'" /> <br>
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String id=(String)request.getParameter("id");
String name=(String)request.getParameter("name");
String zhuanye=(String)request.getParameter("zhuanye");
String nianji=(String)request.getParameter("nianji");
String banji=(String)request.getParameter("banji");
if(util.isEmpty(id,name,zhuanye,nianji,banji)){
out.print("<script language='javaScript'> alert('输入为空');window.history.back(-1);</script>");
}
else{
util.adddata(id, name, zhuanye, nianji, banji);
out.print("<script language='javaScript'> alert('添加成功');</script>");
response.setHeader("refresh", "0;url=show.jsp");
}
%>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>删除页面</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<form action="sdeletejudge.jsp" method="get">
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
删除页面
<br> 要删除的学号: <input type="text" name="id" /> <br>
<br><input type="submit" value="确定" />
<input type="reset" value="重置" /> <br>
<br> <input type="button" value="返回菜单" onclick="location.href='stu.jsp'" /> <br>
</p>
</form>
</body>
</html>
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String id=(String)request.getParameter("id");
if(id==""){
out.print("<script language='javaScript'> alert('输入为空'); window.history.back(-1); </script>");
}
else{
%>
<table border="1"style="text-align:center;">
<tr>
<td align="center" width=8%>学号</td>
<td align="center" width=8%>姓名</td>
<td align="center" width=%>专业</td>
<td align="center" width=8%>年级</td>
<td align="center" width=8%>班级</td>
<td align="center" width=8%>删除</td>
</tr>
<%
Connection connection = util.getConnection();
PreparedStatement preparedStatement=null;
ResultSet rs=null;
try {
String sql = "select * from 1stu";
preparedStatement=connection.prepareStatement(sql);
rs=preparedStatement.executeQuery();
while(rs.next()){
if(id.equals(rs.getObject(1)))
{
%>
<tr>
<td align="center"><%=rs.getObject(1) %></td>
<td align="center"><%=rs.getObject(3) %></td>
<td align="center"><%=rs.getObject(2) %></td>
<td align="center"><%=rs.getObject(4) %></td>
<td align="center"><%=rs.getObject(5) %></td>
<td align="center"><a style="color:blue" href='sdeletejudge2.jsp?id=<%=rs.getObject(1) %>' onclick="javascript:return del()">删除</a> </td>
</tr>
<%
}
}
} catch (SQLException e) {
e.printStackTrace();
}finally{
util.close(rs);
util.close(preparedStatement);
util.close(connection);
}
%>
</table>
<%
}
%>
<script>
function del(){
var r = confirm("确定要删除吗?")
if (r == true) {
return true;
} else {
return false;
}
}
</script>
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<input type="button" onclick="openResult()" value="删除"/>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String id=(String)request.getParameter("id");
util.deletedata(id);
out.print("<script language='javaScript'> alert('删除成功');</script>");
response.setHeader("refresh", "0;url=sdelete.jsp");
%>
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br> <input type="button" value="返回菜单" onclick="location.href='stu.jsp'" /> <br>
</p>
</body>
</html>
<%@page import="DBUtil.Data"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改页面</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<form action="srevisejudge.jsp" method="get">
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br> 输入要修改的学号<input type="text" name="id" /><br>
<br><input type="submit" value="提交" />
<input type="reset" value="重置" /> <br>
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</form>
</body>
</html>
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String id=(String)request.getParameter("id");
if(id==""){
out.print("<script language='javaScript'> alert('输入为空'); window.history.back(-1); </script>");
}
//else if(!util.isSame(id))
// {
// out.print("<script language='javaScript'> alert('该学生不存在'); window.history.back(-1); </script>");
// }
else{
%>
<table border="1"style="text-align:center;">
<tr>
<td align="center" width=10%>学号</td>
<td align="center" width=10%>姓名</td>
<td align="center" width=10%>专业</td>
<td align="center" width=10%>年级</td>
<td align="center" width=10%>班级</td>
<td align="center" width=3%>修改</td>
</tr>
<%
Connection connection = util.getConnection();
PreparedStatement preparedStatement=null;
ResultSet rs=null;
try {
String sql = "select * from 1stu";
preparedStatement=connection.prepareStatement(sql);
rs=preparedStatement.executeQuery();
while(rs.next()){
if(id.equals(rs.getObject(1)))
{
%>
<tr>
<td align="center"><%=rs.getObject(1) %></td>
<td align="center"><%=rs.getObject(2) %></td>
<td align="center"><%=rs.getObject(3) %></td>
<td align="center"><%=rs.getObject(4) %></td>
<td align="center"><%=rs.getObject(5) %></td>
<td align="center"><a style="color:blue" href='srevisejudge2.jsp?id0=<%=rs.getObject(1) %>'>修改</a></td>
</tr>
<%
}
}
} catch (SQLException e) {
e.printStackTrace();
}finally{
util.close(rs);
util.close(preparedStatement);
util.close(connection);
}
%>
</table>
<%
}
%>
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br> <input type="button" value="返回菜单" onclick="location.href='srevise.jsp'" /> <br>
</p>
</body>
</html>
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String id0=(String)request.getParameter("id0");
session.setAttribute("id0",id0);
%>
<table border="1"style="text-align:center;">
<tr>
<td align="center" width=10%>学号</td>
<td align="center" width=10%>姓名</td>
<td align="center" width=10%>专业</td>
<td align="center" width=10%>年级</td>
<td align="center" width=10%>班级</td>
</tr>
<%
Connection connection = util.getConnection();
PreparedStatement preparedStatement=null;
ResultSet rs=null;
try {
String sql = "select * from 1stu";
preparedStatement=connection.prepareStatement(sql);
rs=preparedStatement.executeQuery();
while(rs.next()){
if(id0.equals(rs.getObject(1)))
{
%>
<tr>
<td align="center"><%=rs.getObject(1) %></td>
<td align="center"><%=rs.getObject(2) %></td>
<td align="center"><%=rs.getObject(3) %></td>
<td align="center"><%=rs.getObject(4) %></td>
<td align="center"><%=rs.getObject(5) %></td>
</tr>
<%
}
}
} catch (SQLException e) {
e.printStackTrace();
}finally{
util.close(rs);
util.close(preparedStatement);
util.close(connection);
}
%>
</table>
<form action="srevisejudge3.jsp" method="get">
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br>
<br>
修改总结信息
<br>学号 <input type="text" name="id" /><br>
<br>姓名 <input type="text" name="name" />
<br> 专业 <input type="text" name="zhuanye" /><br>
<br> 年级 <input type="text" name="nianji" /><br>
<br> 班级 <input type="text" name="banji" /><br>
<br><input type="submit" value="提交" />
<input type="reset" value="重置" /> <br>
<br> <input type="button" value="返回菜单" onclick="location.href='srevise.jsp'" /> <br>
</p>
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String id0=(String)session.getAttribute("id0");
String id=(String)request.getParameter("id");
String name=(String)request.getParameter("name");
String zhuanye=(String)request.getParameter("zhuanye");
String nianji=(String)request.getParameter("nianji");
String banji=(String)request.getParameter("banji");
if(id==""||name==""||zhuanye==""||nianji==""||banji=="")
{
out.print("<script language='javaScript'> alert('输入为空');window.history.back(-1);</script>");
}
else
{
util.revisedata(id0,id, name, zhuanye,nianji,banji);
out.print("<script language='javaScript'> alert('修改成功');</script>");
response.setHeader("refresh", "0;url=revise.jsp");
}
%>
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>学生功能页</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<p style="text-align:center;color:white;font-family:宋体; font-size:20px">
<br> 选择功能: <input type="button" value="增加" onclick="location.href='sadd.jsp'" />
<input type="button" value="删除" onclick="location.href='sdelete.jsp'" />
<input type="button" value="修改" onclick="location.href='srevise.jsp'" />
<input type="button" value="查询" onclick="location.href='ssearch.jsp'" />
<input type="button" value="浏览" onclick="location.href='show.jsp'" />
<br>
</p>
</body>
</html>
<%@page import="DBUtil.Data"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>添加教师</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<form action="taddjudge.jsp" method="get">
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br>
<br>
<br> 工号<input type="text" name="id" /><br>
<br> 姓名<input type="text" name="name" /><br>
<br>职位 <input type="text" name="zhiwei" /><br>
<br> 课程<input type="text" name="kecheng" /><br>
<br><input type="submit" value="提交" />
<input type="reset" value="重置" /> <br>
<br> <input type="button" value="注册" onclick="location.href='login.jsp'" /> <br>
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String id=(String)request.getParameter("id");
String name=(String)request.getParameter("name");
String zhiwei=(String)request.getParameter("zhiwei");
String kecheng=(String)request.getParameter("kecheng");
{
util.addtea(id, name, zhiwei, kecheng);
out.print("<script language='javaScript'> alert('添加成功');</script>");
response.setHeader("refresh", "0;url=show.jsp");
}
%>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>删除页面</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<form action="tdeletejudge.jsp" method="get">
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
删除页面
<br> 要删除的工号: <input type="text" name="id" /> <br>
<br><input type="submit" value="确定" />
<input type="reset" value="重置" /> <br>
<br> <input type="button" value="返回菜单" onclick="location.href='tea.jsp'" /> <br>
</p>
</form>
</body>
</html>
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String id=(String)request.getParameter("id");
if(id==""){
out.print("<script language='javaScript'> alert('输入为空'); window.history.back(-1); </script>");
}
else{
%>
<table border="1"style="text-align:center;">
<tr>
<td align="center" width=8%>工号</td>
<td align="center" width=8%>姓名</td>
<td align="center" width=8%>职位</td>
<td align="center" width=8%>课程</td>
<td align="center" width=8%>删除</td>
</tr>
<%
Connection connection = util.getConnection();
PreparedStatement preparedStatement=null;
ResultSet rs=null;
try {
String sql = "select * from 1stu";
preparedStatement=connection.prepareStatement(sql);
rs=preparedStatement.executeQuery();
while(rs.next()){
if(id.equals(rs.getObject(1)))
{
%>
<tr>
<td align="center"><%=rs.getObject(1) %></td>
<td align="center"><%=rs.getObject(3) %></td>
<td align="center"><%=rs.getObject(2) %></td>
<td align="center"><%=rs.getObject(4) %></td>
<td align="center"><%=rs.getObject(5) %></td>
<td align="center"><a style="color:blue" href='sdeletejudge2.jsp?id=<%=rs.getObject(1) %>' onclick="javascript:return del()">删除</a> </td>
</tr>
<%
}
}
} catch (SQLException e) {
e.printStackTrace();
}finally{
util.close(rs);
util.close(preparedStatement);
util.close(connection);
}
%>
</table>
<%
}
%>
<script>
function del(){
var r = confirm("确定要删除吗?")
if (r == true) {
return true;
} else {
return false;
}
}
</script>
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>学生功能页</title>
</head>
<body>
<p style="text-align:center;color:white;font-family:宋体; font-size:20px">
<br> 选择功能: <input type="button" value="录入成绩" onclick="location.href='gadd.jsp'" />
<input type="button" value="修改成绩" onclick="location.href='grevise.jsp'" />
<input type="button" value="查看成绩" onclick="location.href='gsearch.jsp'" />
<input type="button" value="修改个人信息" onclick="location.href='trevise.jsp'" />
<br>
</p>
</body>
</html>
<%@page import="DBUtil.Data"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改页面</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<form action="trevisejudge.jsp" method="get">
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br> 输入要修改的教师<input type="text" name="id" /><br>
<br><input type="submit" value="提交" />
<input type="reset" value="重置" /> <br>
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</form>
</body>
</html>
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改信息</title>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String id=(String)request.getParameter("id");
if(id==""){
out.print("<script language='javaScript'> alert('输入为空'); window.history.back(-1); </script>");
}
else{
%>
<table border="1"style="text-align:center;">
<tr>
<td align="center" width=10%>工号</td>
<td align="center" width=10%>姓名</td>
<td align="center" width=10%>职位</td>
<td align="center" width=10%>课程</td>
<td align="center" width=3%>修改</td>
</tr>
<%
Connection connection = util.getConnection();
PreparedStatement preparedStatement=null;
ResultSet rs=null;
try {
String sql = "select * from 1tea";
preparedStatement=connection.prepareStatement(sql);
rs=preparedStatement.executeQuery();
while(rs.next()){
if(id.equals(rs.getObject(1)))
{
%>
<tr>
<td align="center"><%=rs.getObject(1) %></td>
<td align="center"><%=rs.getObject(2) %></td>
<td align="center"><%=rs.getObject(3) %></td>
<td align="center"><%=rs.getObject(4) %></td>
<td align="center"><a style="color:blue" href='trevisejudge2.jsp?kecheng0=<%=rs.getObject(1) %>'>修改</a> </td>
</tr>
<%
}
}
} catch (SQLException e) {
e.printStackTrace();
}finally{
util.close(rs);
util.close(preparedStatement);
util.close(connection);
}
%>
</table>
<%
}
%>
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</body>
</html>
<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String id0=(String)request.getParameter("id0");
session.setAttribute("id0",id0);
%>
<table border="1"style="text-align:center;">
<tr>
<td align="center" width=10%>工号</td>
<td align="center" width=10%>姓名</td>
<td align="center" width=10%>职位</td>
<td align="center" width=10%>课程</td>
</tr>
<%
Connection connection = util.getConnection();
PreparedStatement preparedStatement=null;
ResultSet rs=null;
try {
String sql = "select * from 1tea";
preparedStatement=connection.prepareStatement(sql);
rs=preparedStatement.executeQuery();
while(rs.next()){
if(id0.equals(rs.getObject(3)))
{
%>
<tr>
<td align="center"><%=rs.getObject(1) %></td>
<td align="center"><%=rs.getObject(2) %></td>
<td align="center"><%=rs.getObject(3) %></td>
<td align="center"><%=rs.getObject(4) %></td>
</tr>
<%
}
}
} catch (SQLException e) {
e.printStackTrace();
}finally{
util.close(rs);
util.close(preparedStatement);
util.close(connection);
}
%>
</table>
<form action="trevisejudge3.jsp" method="get">
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br>
<br>
修改信息
<br>工号<input type="text" name="id" /><br>
<br>姓名<input type="text" name="name" />
<br>职位<input type="text" name="zhiwei" />
<br>课程<input type="text" name="kecheng" /><br>
<br><input type="submit" value="提交" />
<input type="reset" value="重置" /> <br>
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
text-align: center;
background: #f0f0f0 url("1.jpg") no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
font-size: 16px;
}</style>
</head>
<body>
<jsp:useBean id="util" class="DBUtil.Data" scope="page" />
<%
String id0=(String)session.getAttribute("id0");
String id=(String)request.getParameter("id");
String zhiwei=(String)request.getParameter("zhiwei");
String kecheng=(String)request.getParameter("kecheng");
String name=(String)request.getParameter("name");
if(id==""||name==""||kecheng==""||zhiwei=="")
{
out.print("<script language='javaScript'> alert('输入为空');window.history.back(-1);</script>");
}
else
{
util.revisegrade(id0,kecheng,id,name,zhiwei);
out.print("<script language='javaScript'> alert('修改成功');</script>");
response.setHeader("refresh", "0;url=grevise.jsp");
}
%>
<p style="text-align:center;color: black; font-family: 宋体; font-size: 20px">
<br> <input type="button" value="返回菜单" onclick="location.href='menu.jsp'" /> <br>
</p>
</body>
</html>
标签:size,center,管理系统,05,background,宏志,font,id,String From: https://www.cnblogs.com/ZRGUGUGU818/p/17472143.html