DC00023基于jsp+MySQL新生报到管理系统

news/2024/9/30 12:39:09 标签: java, mysql, 开发语言

1、项目功能演示

DC00023基于jsp新生报到管理系统java web+MySQL新生管理系统

2、项目功能描述

基于jsp+MySQL新生报到管理系统项目分为学生、辅导员、财务处和系统管理员四个角色。

2.1 学生功能

1、系统登录
2、校园新闻、报到流程、学校简介、在线留言、校园风光、入校须知、大学公告、证书清单
3、个人资料管理
4、缴费记录查看
5、我的宿舍查看

2.2 辅导员功能

1、系统登录
2、留言管理
3、新生报到添加
4、宿舍分配

2.3 财务处功能

1、系统登录
2、个人密码管理
3、学生缴费添加、学生缴费查询

2.4 系统管理员功能

1、系统登录
2、管理员管理
3、校园新闻管理
4、校园风光管理
5、宿舍楼管理
6、班级信息管理
7、留言管理
8、专业信息管理
9、新生报到管理
10、宿舍分配管理
11、大学公告管理
12、入校须知管理
13、系统管理:系统公告、学校简介、友情链接、新生报到
14、证件管理

3、项目运行截图(部分)

 

4、项目核心代码

4.1 数据库操作类

java">package db;

import java.io.PrintStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class db
{
  private String dbDriver = "com.mysql.cj.jdbc.Driver";

  private String sConnStr = "jdbc:mysql://localhost:3306/arrivals?useSSL=false&serverTimezone=Asia/Shanghai&characterEncoding=utf-8&autoReconnect=true";
  public Connection connect = null;
  public ResultSet rs = null;

  public db() {
    try {
      Class.forName(this.dbDriver).newInstance();

      this.connect = DriverManager.getConnection(this.sConnStr, "root", "root");
      
    }
    catch (Exception ex)
    {
      ex.printStackTrace();
    }
  }

  public ResultSet executeQuery(String sql)
  {
    try {
      this.connect = DriverManager.getConnection(this.sConnStr, "root", "root");
      Statement stmt = this.connect.createStatement();
      this.rs = stmt.executeQuery(sql);
    }
    catch (SQLException ex) {
      ex.printStackTrace();
    }

    return this.rs;
  }

  public void executeUpdate(String sql)
  {
    Statement stmt = null;
    this.rs = null;
    try {
      this.connect = DriverManager.getConnection(this.sConnStr, "root", "root");
      stmt = this.connect.createStatement();
      stmt.executeUpdate(sql);
      stmt.close();
      this.connect.close();
    }
    catch (SQLException ex)
    {
      ex.printStackTrace();
    }
  }
}

 4.2 主界面

<%@ page language="java" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ page language="java" import="java.sql.*"%>
<jsp:useBean id="myconnDbBean" scope="page" class="db.db" />
<html>
<head>
<base href="<%=basePath%>">

<title>新生报到系统</title>
<LINK href="qtimages/style.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.style1 {
	WIDTH: 63px
}

.STYLE2 {
	color: #477641;
	font-weight: bold;
}

.STYLE3 {
	color: #FFFFFF
}

.STYLE4 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>

</head>

<body>
	<table width="992" border="0" align="center" cellpadding="0"
		cellspacing="0">
		<tr>
			<td colspan="2"><%@ include file="qttop.jsp"%>
			</td>
		</tr>
		<tr>
			<td width="163" valign="top"><%@ include file="qtleft.jsp"%></td>
			<td width="813" valign="top"><table width="98%" border="0"
					align="center" cellpadding="0" cellspacing="0">
					<tbody>
						<tr>
							<td height="44" background="qtimages/index_r4_c8.jpg"><table
									width="100%" border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td width="8%">&nbsp;</td>
										<td width="92%" class="red STYLE2">学校简介</td>
									</tr>
								</table></td>
						</tr>
						<tr>
							<td height="182" valign="top" class="boder"><table
									cellspacing="0" cellpadding="0" width="98%" align="center"
									border="0">
									<tbody>
										<tr>
											<td valign="top" width="487"><div class="introliness">
													<%
														String sql = "select content from dx where leibie='系统简介'";
														String neirong = "";
														ResultSet RS_result = myconnDbBean.executeQuery(sql);
														while (RS_result.next()) {
															neirong = RS_result.getString("content");
															out.print(neirong);
														}
													%>
												</div></td>
											<td width="13">&nbsp;</td>
											
										</tr>
									</tbody>
								</table></td>
						</tr>
						<tr>
							<td valign="top" height="9"><img
								src="qtimages/index_r19_c8.jpg" width="320" /></td>
						</tr>
						<tr>
							<td height="3"></td>
						</tr>
						<tr>
							<td background="qtimages/index_r52_c8.jpg" height="53"><table
									width="100%" border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td width="8%">&nbsp;</td>
										<td width="92%" class="red STYLE2">校园风光</td>
									</tr>
								</table></td>
						</tr>
						<tr>
							<td class="boder" height="130"><table class="newsline"
									cellspacing="0" cellpadding="0" width="98%" align="center"
									border="0">
									<tbody>

									</tbody>
								</table>
								<table width="100%" height="100%" border="0" align="center"
									cellpadding="0" cellspacing="0">
									<tr>

										<td><table width="100%" height="100%" border="0"
												align="center" cellpadding="0" cellspacing="0">
												<tr>
													<%
														sql = "select  id,mingcheng,tupian from xiaoyuanfengguang where tupian<>'' order by id desc limit 0,4";
														RS_result = myconnDbBean.executeQuery(sql);
														String xingming = "";
														String touxiang = "";
														String id = "";
														while (RS_result.next()) {
															id = RS_result.getString("id");
															xingming = RS_result.getString("mingcheng");
															touxiang = RS_result.getString("tupian");
													%>
													<td align="center"><table width="150" border="0"
															cellspacing="0" cellpadding="0">
															<tr>
																<td height="129" align="center"><a
																	href="<%=touxiang%>" target="_blank"><img
																		src="<%=touxiang%>" width="129" height="123"
																		border="0" /></a></td>
															</tr>
															<tr>
																<td height="26" align="center"><%=xingming%></td>
															</tr>
														</table></td>
													<%
														}
													%>
												</tr>
											</table></td>
									</tr>
								</table></td>
						</tr>
						<tr>
							<td><img height="9" src="qtimages/index_r19_c8.jpg"
								width="320" /></td>
						</tr>
						<tr>
							<td height="3"></td>
						</tr>
						<tr>
							<td><table cellspacing="0" cellpadding="0" width="100%"
									border="0">
									<tbody>
										<tr>
											<td width="387" valign="top"><table cellspacing="0"
													cellpadding="0" width="387" border="0">
													<tbody>
														<tr>
															<td width="387" height="40"
																background="qtimages/index_r22_c8.jpg"><table
																	width="100%" border="0" cellpadding="0" cellspacing="0">
																	<tr>
																		<td width="15%">&nbsp;</td>
																		<td width="85%"><a href="news.jsp?lb=大学公告"><font
																				class="STYLE2">大学公告</font></a></td>
																	</tr>
																</table></td>
														</tr>
														<tr>
															<td class="boder" valign="top" height="131"><table
																	class="newsline" cellspacing="0" cellpadding="0"
																	width="95%" align="center" border="0">
																	<tbody>
																		<%
																			sql = "select  id,biaoti,addtime from xinwentongzhi where leibie='大学公告' order by id desc limit 0,7";

																			RS_result = myconnDbBean.executeQuery(sql);
																			// String id="";
																			String biaoti = "";
																			String addtime = "";
																			int i = 0;
																			while (RS_result.next()) {
																				i = i + 1;
																				id = RS_result.getString("id");
																				biaoti = RS_result.getString("biaoti");
																				if (biaoti.length() >= 28) {
																					biaoti = biaoti.substring(0, 28);
																				}
																				addtime = RS_result.getString("addtime");
																		%>
																		<tr>
																			<td width="5%" height="25"><img height="7"
																				src="qtimages/index_r9_c9.jpg" width="7" /></td>
																			<td width="95%" height="25"><a
																				href="gg_detail.jsp?id=<%=id%>"><%=biaoti%></a></td>
																		</tr>
																		<%
																			}
																		%>
																	</tbody>
																</table></td>
														</tr>
														<tr>
															<td background="qtimages/index_r29_c8.jpg" height="10"></td>
														</tr>
													</tbody>
												</table></td>
											<td width="5"></td>
											<td width="400" valign="top"><table width="100%"
													border="0" align="center" cellpadding="0" cellspacing="0">
													<tbody>
														<tr>
															<td width="387" height="40"
																background="qtimages/index_r22_c14.jpg"><table
																	width="100%" border="0" cellpadding="0" cellspacing="0">
																	<tr>
																		<td width="16%">&nbsp;</td>
																		<td width="84%"><a href="news.jsp?lb=入校需知"><font
																				class="STYLE2">入校需知</font></a></td>
																	</tr>
																</table></td>
														</tr>
														<tr>
															<td class="boder" valign="top" height="131"><table
																	class="newsline" cellspacing="0" cellpadding="0"
																	width="95%" align="center" border="0">
																	<tbody>
																		<%
																			sql = "select  id,biaoti,addtime from xinwentongzhi where leibie='入校需知' order by id desc limit 0,7";

																			RS_result = myconnDbBean.executeQuery(sql);
																			// String id="";
																			biaoti = "";
																			addtime = "";
																			i = 0;
																			while (RS_result.next()) {
																				i = i + 1;
																				id = RS_result.getString("id");
																				biaoti = RS_result.getString("biaoti");
																				if (biaoti.length() >= 28) {
																					biaoti = biaoti.substring(0, 28);
																				}
																				addtime = RS_result.getString("addtime");
																		%>
																		<tr>
																			<td width="5%" height="25"><img height="7"
																				src="qtimages/index_r9_c9.jpg" width="7" /></td>
																			<td width="95%" height="25"><a
																				href="gg_detail.jsp?id=<%=id%>"><%=biaoti%></a></td>
																		</tr>
																		<%
																			}
																		%>
																	</tbody>
																</table></td>
														</tr>
														<tr>
															<td background="qtimages/index_r29_c8.jpg" height="10"></td>
														</tr>
													</tbody>
												</table></td>
										</tr>
									</tbody>
								</table></td>
						</tr>
						<tr>
							<td height="3"></td>
						</tr>
					</tbody>
				</table></td>
		</tr>
	</table>
	<%@ include file="qtdown.jsp"%>
</body>
</html>

 4.3 登录界面

<%@ page language="java" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ page language="java" import="java.sql.*"%>
<jsp:useBean id="connDbBean" scope="page" class="db.db" />
<html>
<head>
<base href="<%=basePath%>">

<title>用户登录</title>

<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
    <script type="text/javascript" src="lib/html5.js"></script>
    
    <script type="text/javascript" src="lib/PIE_IE678.js"></script>
    <![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.login.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet"
	type="text/css" />
<!--[if IE 6]>
    <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
<body>
	<div class="header"></div>
	<div class="loginWraper">
		<div id="loginform" class="loginBox">
			<form name="form1" method="post" action="adminyanzheng.jsp"
				class="form form-horizontal">
				<div class="row cl">
					<label class="form-label col-3"><i class="Hui-iconfont">帐号</i></label>
					<div class="formControls col-8">
						<input name="username" type="text" id="username"
							class="input-text size-L" />

					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-3"><i class="Hui-iconfont">密码</i></label>
					<div class="formControls col-8">
						<input name="pwd" type="password" id="pwd"
							class="input-text size-L" />

					</div>
				</div>

				<div class="row cl">
					<label class="form-label col-3"><i class="Hui-iconfont">类型</i></label>
					<div class="formControls col-8">
						<select name="cx" id="cx" class="input-text size-L">
							<option value="管理员">管理员</option>
							<option value="财务处">财务处</option>
							<option value="辅导员">辅导员</option>
						</select> <input name="login" type="hidden" id="login" value="1">
					</div>
				</div>

				<div class="row">
					<div class="formControls col-8 col-offset-3"></div>
				</div>
				<div class="row">
					<div class="formControls col-8 col-offset-3">
						<input type="submit" name="Submit" value="登陆"
							class="btn btn-default radius size-L"> <input
							type="reset" name="Submit2" value="重置"
							class="btn btn-success radius size-L">

					</div>
				</div>
			</form>
		</div>
	</div>

</body>
</html>

5、项目内容包含

 

6、项目获取

6.1 方式一

私聊或者扫描下方名片获取项目文件。

6.2 方式二

点击此处直接获取项目文件。 


http://www.niftyadmin.cn/n/5685118.html

相关文章

Xiaojie雷达之路---静态杂波滤除

Hello,大家好,我是Xiaojie,欢迎大家能够和Xiaojie来一起学习毫米波雷达知识,本篇文章主要是介绍一下雷达信号处理中的静态杂波滤除,一起来看看吧!!! 前言 在雷达信号处理中有时候不需要考虑静止的物体,会将相对于雷达静止的物体进行滤除,静止目标被滤除后,会降低雷达…

【2024.9.29练习】R 格式

题目描述 题目分析 带小数点的高精度乘法。小数点在计算时忽略&#xff0c;只需在最终打印字符串的时候在合适位置四舍五入即可。对于&#xff0c;可理解为对d乘2总共n次。因此使用“单精度高精度”类型的算法足矣。 我的代码 一开始代码有错误&#xff0c;我只想到了对小数点…

Mac pnpm安装

安装pnpm的时候一定要把npm更新到最新版 不然pnpm下载不成功。 &#xff08;更新npm&#xff09;&#xff1a;sudo npm install -g npm (安装pnpm:) sudo npm install -g pnpm 检验安装是否成功&#xff1a;pnpm --version 项目内安装依赖&#xff1a;pnpm install / 运行项目&…

用C++游戏开发

引言 C被广泛使用于游戏开发中&#xff0c;这是因为它提供了高性能、灵活的内存管理&#xff0c;以及与硬件的低级别交互能力。在这篇文章中&#xff0c;我们将介绍C游戏开发的基础知识&#xff0c;包括游戏引擎的选择、基本的编程概念以及一些实践建议。 C在游戏开发中的优势…

二值图像的面积求取的两种方法及MATLAB实现

一、引言 面积在数字图像处理中经常用到&#xff0c;在MATLAB中&#xff0c;计算二值图像的面积通常可以通过两种主要方法实现&#xff1a;遍历法和直接利用bwarea函数。下面将分别介绍这两种方法的原理和相应的MATLAB代码示例。 二、遍历法计算二值图像面积的原理和MATLAB代码…

PostgreSQL是否有等待事件

PostgreSQL是否有等待事件 PostgreSQL 提供了等待事件&#xff08;Wait Events&#xff09;的机制&#xff0c;用于监控数据库运行过程中因资源争用而导致的等待情况。这些等待事件可以帮助数据库管理员识别导致性能问题的瓶颈&#xff0c;例如锁冲突、I/O 等待等。 什么是等…

【快速删除 node_modules 】rimraf

目录 1. 什么是node_modules 2. 卸载一个npm包 3. 删除 node_modules 为什么这么慢 4. rimraf 5. 为什么rimraf 这么快 作为前端开发&#xff0c;无论我们关注不关注&#xff0c;每天都能接触到node_modules。通常产生于一个npm install命令&#xff0c;之后就不会多加关注…

深度学习--------------------------------门控循环单元GRU

目录 门候选隐状态隐状态门控循环单元GRU从零开始实现代码初始化模型参数定义隐藏状态的初始化函数定义门控循环单元模型训练该部分总代码简洁代码实现 做RNN的时候处理不了太长的序列&#xff0c;这是因为把整个序列信息全部放在隐藏状态里面&#xff0c;当时间很长的话&#…