Javaweb考核项目——墨也健身房(下)

此为下篇博客,附上篇链接:https://blog.csdn.net/qq_40956679/article/details/84647213

--------------------------------------分隔符--------------------------------------

 

*****会员后台管理系统框架*****

1.moye_main.jsp  

<%@ page language="java" pageEncoding="UTF-8"%>

<html>
  <head><title>墨也健身俱乐部后台管理系统</title>
  	</head>
  	<frameset rows="80,*">
  		<frame src="moye_top.jsp" name="top" scrolling="no">
  		<frameset cols="200,*">
  			<frame src="moye_left.jsp" scrolling="no">
  			<frame src="moye_right.jsp" name="right" scrolling="auto" >
  		</frameset>
  	</frameset>
</html>

2.moye_left.jsp  (置入查看所有用户、查询用户、插入用户、删除用户功能模块)

<%@ page language="java" pageEncoding="UTF-8"%>

<html>
  <head><title>左侧导航页</title>
  	<link href="Css_moye.css" type="text/css" rel="stylesheet">
  </head>
  <body class="top">
  	<form action="list" method="post" target="right">
  		<p><input class="submit" type="submit" value="查看所有用户信息"/></p>
  	</form>
  	<p><a href="SQL_find.jsp" target="right">查询用户信息</a></p>
  	<p><a href="SQL_create.jsp" target="right">插入用户信息</a></p>
  	<p><a href="SQL_delete.jsp" target="right">删除用户信息</a></p>
  </body>
</html>

3.moye_right.jsp  (显示各种功能页面)

<%@ page language="java" pageEncoding="UTF-8"%>

<html>
  <head><title>显示页面</title>
    	<link href="Css_moye.css" type="text/css" rel="stylesheet">
  </head>
  <body class="top"></body>
</html>

4.moye_top.jsp  (顶部页面)

<%@ page language="java" pageEncoding="UTF-8"%>

<html>
  <head><title>导航栏top</title>
  	<link href="Css_moye.css" type="text/css" rel="stylesheet">
  	</head>
  <body class="top">
  		<div class="top"><img  class="logo" src="image/logo2.jpg">&nbsp;墨也健身后台管理系统</div>
  </body>
</html>

 

*****面向用户页面*****

1.zhuye.jsp  (主页)

其代码:

<%@ page language="java" pageEncoding="UTF-8"%>

<html>
<head>
<title>墨也健身官网-墨也全球</title>
<link href="Css_zhuye.css" type="text/css" rel="stylesheet">
	<script language="javascript" src="Script.js">
</script>
</head>

<body>
	<div class="top">
		<div class="top">
			<a href="">墨也健身</a><a class="right" href="login.jsp" id="bian" onmouseover="change()" onmouseout="back()">登录</a>
		</div>
	</div>
	<div class="logo">
		<div class="logoRight"><img  class="logo" src="image/logo1.jpg">&nbsp;&nbsp;致力于创造一个更健康的世界 创造一个更健康的世界是我们的使命,这并不意味着强迫人们运动,而是帮助人们爱上健身,之后他们会开始主动锻炼。
		</div>
	</div>
	<div>
		<img src="image/主页.jpg">
	</div>
	</div>
	<div class="logo2">
	</div>
	<div>
		<img src="image/beijing4.jpg">
	</div>
	<div class="root">
		<div>
			<h2>&nbsp;&nbsp;关于墨也健身俱乐部</h2>
			<a href="" class="root">关于墨也</a> 
			<a href="" class="root">墨也动态</a> 
			<a href="" class="root">招贤纳士</a> 
			<a href="" class="root">联系我们</a> 
			<a href="" class="root">查找课程</a>
		</div>
		<hr width="60%" size="1" color="white" align="center" />
			<div align="center"><span >© 墨也健身服务有限公司 版权所有</span></div>
	</div>
</body>
</html>

2.login.jsp  (登录页面)

代码:

<%@ page language="java" pageEncoding="UTF-8"%>

<html>
  <head>
  	<title>俱乐部成员登陆-墨也健身官网</title>
  	<link href="Css_login.css" type="text/css" rel="stylesheet">
  	<script language="javascript" src="Script.js">
	
	</script>
  </head>
  <body>
	<form name="form1" action="yanzheng" method="post" onsubmit="return on_submit()"> 
		<table  align="center" bgcolor="white" cellpadding="15px" cellspacing="5px">
			<tr>
				<td class="left">俱乐部成员登录</td>
			<tr>
				<td><input type="text" name="xm" placeholder="用户名" value="" class="normal"></td></tr>
			<tr>
				<td><input type="password" name="mm" placeholder="密码" value="" class="normal"></td></tr>
			<tr>
				<td><input type=submit value="登录" class="submit" id="bian" nmouseover="change()" onmouseout="back()" >
							<a style="margin-left:80px" href="SQL_create.jsp">注册</a></td></tr>
		</table>
	</form>
  </body>
</html>

3.SQL_create.jsp  (注册、插入功能页面)

其代码:

<%@ page language="java" pageEncoding="UTF-8"%>

<html>
  <head>
  	<title>俱乐部成员注册-墨也健身官网</title>
  	<link href="Css_sql.css" type="text/css" rel="stylesheet">
  		<script language="javascript" src="Script.js">
	</script>
  </head>
  
  <body>
    <form name="form1" action="insert" method="post" onsubmit="return on_submit()"> 
		<table  align="center" bgcolor="white" cellpadding="10px" cellspacing="5px">
			<tr>
				<td class="left" colspan="2">俱乐部成员注册</td>
			<tr>
				<td class="text">用户名:</td><td><input type="text" name="xm" placeholder="用户名范围1~5个字符之间!" value="" class="normal"></td></tr>
			<tr>
				<td class="text">密码:</td><td><input type="password" name="mm" placeholder="密码范围在6~16位之间!" value="" class="normal"></td></tr>
			<tr>
				<td colspan="2"><input type=submit value="注册" class="submit" style="margin-left:120px"></td></tr>
		</table>
	</form>
	
  </body>
</html>

4.SQL_find.jsp  (查询功能页面)

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head><title>查询记录_墨也健身后台管理系统</title>
  	<link href="Css_sql.css" type="text/css" rel="stylesheet">
</head>

<body>
	<form action="find" method="post">
		<table align="center" bgcolor="white" cellpadding="10px" cellspacing="5px">
			<tr>
				<td class="left" colspan="2">俱乐部成员查询</td>
			<tr>
			<tr>
				<td class="text">用户名:</td><td><input type="text" name="xm" class="normal"></td><td>
					<input type=submit value="查询" class="submit" ></td></tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td colspan="2" ></td>
			</tr>
		</table>
	</form>
</body>
</html>

5.SQL_delete.jsp  (删除功能页面)

 

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head><title>删除记录_墨也健身后台管理系统</title>
  	<link href="Css_sql.css" type="text/css" rel="stylesheet">
</head>

<body>
	<form action="delete" method="post">
		<table align="center" bgcolor="white" cellpadding="10px" cellspacing="5px">
			<tr>
				<td class="left" colspan="2">俱乐部成员删除</td>
			</tr>
			<tr>
				<td class="text">用户名:</td><td><input type="text" name="xm" class="normal"></td><td>
					<input type=submit value="删除" class="submit" ></td></tr>
			<tr>
				<td colspan="2"></td>
			</tr>
			<tr>
				<td colspan="2" ></td>
			</tr>
		</table>
	</form>
</body>
</html>

 

*****各种功能显示页面*****

1.moye_login_Success.jsp  (登陆成功页面)

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
  <head><title>会员登入成功页面</title>
  </head>
  
  	<link href="Css_sql.css" type="text/css" rel="stylesheet">
  <body>
  <form name="" action="" method="post"> 
		<table  align="center" bgcolor="white" cellpadding="10px" cellspacing="5px">
			<tr>
				<td class="left" colspan="2">恭喜您,登录成功!</td>
			<tr>
		</table>
	</form>
  </body>
</html>

2.moye_create_Success.jsp  (注册成功页面)

<%@ page language="java" pageEncoding="UTF-8"%>
<html>
  <head><title>会员注册成功页面</title>
  
  			<!-- 3秒后自动跳转至登录页面! -->
  	<meta http-equiv="refresh" content="3;url=login.jsp"/>
  </head>
  
  	<link href="Css_sql.css" type="text/css" rel="stylesheet">
  <body>
  <form name="" action="" method="post"> 
		<table  align="center" bgcolor="white" cellpadding="10px" cellspacing="5px">
			<tr>
				<td class="left" colspan="2">恭喜您,注册成功!</td>
			<tr>
				<td class="text" colspan="2">欢迎加入墨也健身俱乐部!~</td>
			<tr>
				<td class="text" colspan="2">页面3秒后自动跳转至登录页面~</td>
		</table>
	</form>
  </body>
</html>

3.moye_find_Success.jsp  (查询成功页面)

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="beans.User" %>
<html>
<head><title>查询成功页面</title>
  	<link href="Css_sql.css" type="text/css" rel="stylesheet">
</head>

<body>
	<form name="" action="find" method="post">
		<table align="center" bgcolor="white" cellpadding="10px" cellspacing="5px">
			<tr>
				<td class="left" colspan="2">俱乐部成员查询</td>
			<tr>
			<%User user =(User)request.getAttribute("stu"); %>
			<tr>
				<td class="text">用户名:<%=user.getXm()%></td>
				<td class="text">您的密码是:<%=user.getMm()%></td>
			</tr>
		</table>
	</form>
</body>
</html>

4.moye_findAll_Success.jsp  (查看所有用户页面)

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="beans.User" %>
<html>
<head><title>查询成功页面</title>
  	<link href="Css_sql.css" type="text/css" rel="stylesheet">
</head>
<body>
		<table  class="findAll" align="center" bgcolor="white" cellpadding="10px" cellspacing="5px" border="1">
			<tr>
				<td colspan="2" class="findAll_left"><h2>所有用户信息</h2></td></tr>
			<tr>
				<td class="findAll_left"><b>用户名</b></td>
				<td class="findAll_left"><b>密码</b></td></tr>
			<%
				//获取用户名信息集合
				List<User> list = (List<User>) request.getAttribute("list");
				//判断集合是否为空
				if(list == null || list.size() < 1){
					out.print("没有数据!");
				}else{
					//遍历用户名集合中的数据
					for(User uno : list){
			%>
			<tr>
				<td class="findAll"><%=uno.getXm() %></td>
				<td class="findAll"><%=uno.getMm() %></td>
			</tr>
			<%
				}
				}
			 %>
		</table>
</body>
</html>

5.moye_delete_Success.jsp  (删除功能页面)

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="beans.User" %>
<html>
<head><title>删除成功页面</title>
  	<link href="Css_sql.css" type="text/css" rel="stylesheet">
</head>

<body>
	<form action="delete" method="post">
		<table align="center" bgcolor="white" cellpadding="10px" cellspacing="5px">
			<tr>
				<td class="left" colspan="2">俱乐部成员删除</td>
			</tr>
			<%User user =(User)request.getAttribute("stu"); %>
			<tr>
				<td class="text" colspan="2">用户<%=user.getXm()%>,删除成功!</td><td>
			<tr>
				<td colspan="2"></td>
			</tr>
		</table>
	</form>
</body>
</html>

 

查询所有用户信息显示:

查询用户信息:

 

 

ok啦,放到博客里,许多技巧可以借鉴参考,谢谢,觉得不错点个赞呗。

项目包已上传:https://download.csdn.net/download/qq_40956679/10819079

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值