[jsp]代码库
注 释
1.导入项目:
把项目导入到Eclipse中,打开Eclipse,点击fileimportGeneralExisting Projects into worksapce再选中next然后再找项目的路径就可以了。
2.导入数据库
打开SQLyog,建一个新连接,输入密码root,点击databaseimportexecute SQL script找到相应的文件执行。
3.运行项目
选中login.jsp右击找到runas,点击run on server就可以了
管理员账号:admin
管理员密码:admin
参考文献
[1]王国辉.Java Web 开发实战宝典[M].北京: 清华大学出版社,2010.10.
[2]李刚. 轻量级J2EE企业应用实战[M].北京:电子工业出版社,2007.04.
[3]孙卫琴. 精通struts.基于MVC的.java.web设计与开发.北京:电子工业出版社.2004.08.
[4]Jon Duckett著,杜静,敖富江译.Web编程入门经典:HTML、XHTML和CSS[M].北京:清华大学出版社,2010.01.
[5]刘京华.Web整合开发王者归来[M].北京: 清华大学出版社,2010.01.
[6]莫永腾.深入浅出设计模式.北京:清华大学出版社,2006.9.1.
[7](美)Paul Wilton ,Jeremy McPeak 著,施宏斌 译. JavaScript 入门经典(第三版)[M]. 北京:清华大学出版社 2009.2 .
[8](美)Duckett,J.著,杜静,敖富江 译. Web编程入门经典---HTML、XHTML和CSS(第二版)[M]. 北京: 清华大学出版社,2010.1.
[9](英)福塔 著,刘晓霞,钟鸣 译. MySQL必知必会[ M ]. 北京:人民邮电出版社,2009.
[10]Nicholas C Zakas著,曹力,张欣译. JavaScript高级程序设计 第五版[M].北京: 人民邮电出版社,2007.07.
[11]耿祥义,张跃平. Java2 实用教程 第三版[M]. 北京: 清华大学出版社,2006.08.
[12]吴建,郑潮等. UML基础与Rose建模案例 第二版[M]. 北京: 人民邮电大学,2007.04.
[13] Robert Lafore著,计晓云,赵妍等译. Java数据结构和算法[M].北京: 中国电力出版社,2004.02.
[14] Bruce Eckel. Thinking in Java 4th Edition[M].2006.01.
[15] Alan Shalloway,James R.Trott著,徐声言译.设计模式解析 第二版[M].北京: 人民邮电出版社,2003.
[16] Cay S. Horstmann著,叶乃文译. JAVA 2核心技术 卷I 第七版[M]. 北京: 机械工业出版社,2006.05.
[17] Isabelle Attali and Thomas Jensen.Java on Smart Cards:Programming and Security[M].2001.
[18] Nuno Jardim Nunes.UML Modeling Languages and Applications[M].2005.
[19] 耿祥义,张跃平著. JSP实用教程 第二版[M].北京:清华大学出版社,2007.12.
[20] [9] 王振辉,吴广茂. SQL查询语句优化研究[J]. 计算机应用, 2005.
致 谢
首先感谢我的导师郝胜男。论文从选题、结构安排、文字处理直至最终定稿的全过程无一不是在高老师的悉心指导、严格要求和亲切关怀下完成的。
由于我从来没有深研究过java编程,所以对它的开发环境不是很了解,可能编的只是一些皮毛,但是就连这些我还是很不懂,经常因为这些小错误三两天没有进展,我很生气,很灰心,我很想放弃。但是我的同学竟耐心的给我检查错误,虽然费了很大劲他还是不言弃,我很受鼓舞,从此我便下定决心一定要完成。
从那以后我有了自信,有了希望。有的错误他也不能解决,我只好硬着头皮,去钻研,终于我成功,我很开心。他不仅教会如何自信,还让我学会如何利用网上的知识。我比以前更自信,更强大了。我非常感谢我的同学,还要感谢那些为我默默付出的人。我要特别感谢为我默默付出的导师—郝胜男。
附录1
Webt.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <servlet>
<servlet-name>handelLogin</servlet-name>
<servlet-class>com.cszdglxt.servlets.HandelLogin</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>handelLogin</servlet-name>
<url-pattern>/helplogin</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>handelExit</servlet-name>
<servlet-class>com.cszdglxt.servlets.HandleExit</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>handelExit</servlet-name>
<url-pattern>/helpexit</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
</web-app>
admin_bill_add.jsp
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script src="js/zhangDanTianJia.js">
</script>
</head>
<body>
<%
%>
<div class="main">
<div class="optitle clearfix">
<div class="title">账单管理>></div>
</div>
<form method="post" action="helplogin">
<input type="hidden" name="op" value="ZDAdd"/>
<div class="content">
<table class="box">
<tr>
<td class="field">账单编号:</td>
<td><input type="text" name="zdid" id="zdid" onBlur="checkZdid();"/><font color="#FF0000">*<span id="zdidMsg"></span></font></td>
</tr>
<tr>
<td class="field">交易金额:</td>
<td><input type="text" name="zdtransmoney" id="zdtransmoney" onBlur="checkZdtransmoney();"/><font color="#FF0000">*<span id="zdtransmoneyMsg"></span></font></td>
</tr>
<tr>
<td class="field">交易单位:</td>
<td><input type="text" name="zdtransunits" id="zdtransunits" onBlur="checkZdtransunits();"/><font color="#FF0000">*<span id="zdtransunitsMsg"></span></font></td>
</tr>
<tr>
<td class="field">交易数量:</td>
<td><input type="text" name="zdtransnunber" id="zdtransnunber" onBlur="checkZdtransnunber();"/><font color="#FF0000">*<span id="zdtransnunberMsg"></span></font></td>
</tr>
<tr>
<td class="field">商品名称:</td>
<td><input type="text" name="zdproductname"/></td>
</tr>
<tr>
<td class="field">商品描述:</td>
<td><textarea name="zdproducdesc" cols="40" rows="6"></textarea></td>
</tr>
<tr>
<td class="field">所属供应商:</td>
<td><select name="zdproducmanufacture">
<c:forEach items="${gysName}" var="gysNames">
<option value="${gysNames}" selected>${gysNames}</option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<td class="field">是否付款:</td>
<td><select name="payment">
<option value="是">是</option>
<option value="否" selected>否</option>
</select>
</td>
<td><font color="#FF0000" size="+2">${info.msg}</font></td>
</tr>
</table>
</div>
<div class="buttons">
<input type="submit" name="submit" value="提 交" class="input-button" />
<!-- <input type="button" name="button" value="返 回" class="input-button" onclick="history.back()" />
-->
<input type="button" name="button" value="返回" class="input-button" onclick="location.href='admin_bill_list.jsp'"/>
</div>
</form>
</div>
</body>
</html>
admin_bill_list.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<body>
<% %>
<div class="menu">
<form method="post" action="helplogin">
商品名称:<input type="text" name="commodityname" class="input-text" />
是否付款:<select name="payment">
<option value="是">是</option>
<option value="否" selected>否</option>
</select>
<input type="submit" name="zdgroup" value="组合查询" class="button" />
</form>
</div>
<div class="main">
<div class="optitle clearfix">
<em><input type="button" name="addnumber" value="添加数据" class="input-button" onclick="location.href='admin_bill_add.jsp?names=${gysName}'" /></em>
<div class="title">账单管理>></div>
</div>
<div class="content">
<table class="list">
<tr>
<td>账单编号</td>
<td>商品名称</td>
<td>商品数量</td>
<td>交易金额</td>
<td>是否付款</td>
<td>供应商名称</td>
<td>商品描述</td>
<td>账单时间</td>
</tr>
<c:forEach var="zdbean" items="${list}">
<tr>
<td>${zdbean.zd_id}</td>
<td><a href="helplogin?op=ZDXinXi&id=${zdbean.zd_id}">${zdbean.zd_spmingcheng}</a></td>
<td>${zdbean.zd_spshuliang}</td>
<td>${zdbean.zd_jymoney}</td>
<td>${zdbean.zd_sfzhifu}</td>
<td>${zdbean.zd_gysname}</td>
<td>${zdbean.zd_spmiaoshu}</td>
<td>${zdbean.zd_data}</td>
</tr>
</c:forEach>
</table>
</div>
</div>
</body>
</html>
admin_bill_update.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<body>
<div class="main">
<div class="optitle clearfix">
<div class="title">账单管理>></div>
</div>
<form method="post" action="helplogin">
<div class="content">
<table class="box">
<tr>
<td class="field">账单编号:</td>
<td><input type="text" name="zdid" value="${zdbean.zd_id}"/></td>
</tr>
<tr>
<td class="field">交易金额:</td>
<td><input type="text" name="zdtransmoney" value="${zdbean.zd_jymoney}"/></td>
</tr>
<tr>
<td class="field">交易单位:</td>
<td><input type="text" name="zdtransunits" value="${zdbean.zd_danwei}"/></td>
</tr>
<tr>
<td class="field">交易数量:</td>
<td><input type="text" name="zdtransnunber" value="${zdbean.zd_spshuliang}"/></td>
</tr>
<tr>
<td class="field">商品名称:</td>
<td><input type="text" name="zdproductname" value="${zdbean.zd_spmingcheng}"/></td>
</tr>
<tr>
<td class="field">商品描述:</td>
<td><textarea name="zdproducdesc" cols="40" rows="6" value="${zdbean.zd_spmiaoshu}">${zdbean.zd_spmiaoshu}</textarea></td>
</tr>
<tr>
<td class="field">所属供应商:</td>
<td><select name="zdproducmanufacture">
<option value="${zdbean.zd_gysname}" selected>${zdbean.zd_gysname}</option>
</select>
</td>
</tr>
<tr>
<td class="field">是否付款:</td>
<td><select name="payment">
<option value="是">是</option><option value="否">否</option>
<option value="${zdbean.zd_sfzhifu}" selected>${zdbean.zd_sfzhifu}</option>
</select>
</td>
<td><font color="#FF0000" size="+2">${info.msg}</font></td>
</tr>
</table>
</div>
<div class="buttons">
<input type="button" value="返 回" class="input-button" onclick="history.back();" />
<input type="submit" value="修 改" class="input-button" name="op"/>
<input type="submit" value="删 除" class="input-button" name="op"/>
</div>
</form>
</div>
</body>
</html>
admin_index.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>超市账单管理系统</title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<frameset rows="100,*" cols="*" frameborder="no" border="0" framespacing="0">
<frame src="admin_top.jsp" name="topFrame" scrolling="no" noresize="noresize" id="topFrame" />
<frameset cols="200,*" frameborder="no" border="0" framespacing="0">
<frame src="admin_left.jsp" name="leftFrame" scrolling="no" noresize="noresize" id="leftFrame" />
<frame src="welcome.jsp" name="mainFrame" id="mainFrame" />
</frameset>
</frameset>
<noframes><body>
</body></noframes>
</html>
admin_left.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<body class="frame-bd">
<ul class="left-menu">
<li><a href="helplogin?op=ZD" target="mainFrame"><img src="images/btn_bill.gif" /></a></li>
<li><a href="helplogin?op=GYS" target="mainFrame"><img src="images/btn_suppliers.gif" /></a></li>
<c:if test="${login.yh_username=='admin' }"><li><a href="helplogin?op=YH" target="mainFrame"><img src="images/btn_users.gif" /></a></li></c:if>
<li><a href="helpexit" target="_top"><img src="images/btn_exit.gif" /></a></li>
</ul>
</body>
</html>
admin_supplier_add.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script src="js/gongYingShang.js"></script>
</head>
<body>
<div class="main">
<div class="optitle clearfix">
<div class="title">账单管理>></div>
</div>
<form action="helplogin" method="post" onSubmit="return check();">
<input type="hidden" name="op" value="GYSAdd"/>
<div class="content">
<table class="box">
<tr>
<td class="field">供应商编号:</td>
<td><input type="text" name="gysid" id="gysid" onBlur="checkGysid();"/><font color="#FF0000">*<span id="gysidMsg"></span></font></td>
</tr>
<tr>
<td class="field">供应商名称:</td>
<td><input type="text" name="gysname" id="gysname" onBlur="checkGysname();"/><font color="#FF0000">*<span id="gysnameMsg"></span></font></td>
</tr>
<tr>
<td class="field">供应商联系人:</td>
<td><input type="text" name="gyslianxi"/></td>
</tr>
<tr>
<td class="field">供应商电话:</td>
<td><input type="text" name="gysphone"/></td>
</tr>
<tr>
<td class="field">供应商传真:</td>
<td><input type="text" name="gyschuanzhen"/></td>
</tr>
<tr>
<td class="field">供应商地址:</td>
<td><input type="text" name="gysaddress"/></td>
</tr>
<tr>
<td class="field">供应商描述:</td>
<td><textarea name="gysmiaoshu" cols="40" rows="6"></textarea></td>
<td><font color="#FF0000" size="+2">${info.msg}</font></td>
</tr>
</table>
</div>
<div class="buttons">
<input type="submit" name="submit" value="提 交" class="input-button" />
<input type="button" name="button" value="返 回" class="input-button" onclick="history.back();" />
</div>
</form>
</div>
</body>
</html>
admin_supplier_list.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<body>
<div class="menu">
<form method="post" action="helplogin">
供应商名称:<input type="text" name="commodityname"/>
供应商描述:<input type="text" name="commoditymiaoshu"/>
<input type="submit" name="gysgroup" value="组合查询" class="button" />
</form>
</div>
<div class="main">
<div class="optitle clearfix">
<em><input type="button" name="addnumber" value="添加数据" class="input-button" onclick="location.href='admin_supplier_add.jsp'" /></em>
<div class="title">账单管理>></div>
</div>
<div class="content">
<table class="list">
<tr>
<td>编号</td>
<td>供应商名称</td>
<td>供应商描述</td>
<td>联系人</td>
<td>电话</td>
<!-- <td>传真</td> -->
<td>地址</td>
</tr>
<c:forEach var="gysbean" items="${list}">
<tr>
<td>${gysbean.gys_id}</td>
<td><a href="helplogin?op=GYSXinXi&id=${gysbean.gys_id}">${gysbean.gys_name}</a></td>
<td>${gysbean.gys_miaoshu}</td>
<td>${gysbean.gys_lianxiren}</td>
<td>${gysbean.gys_phone}</td>
<!-- <td>${gysbean.gys_chuanzhen}</td> -->
<td>${gysbean.gys_address}</td>
</tr>
</c:forEach>
</table>
</div>
</div>
</body>
</html>
admin_supplier_update.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<body>
<div class="main">
<div class="optitle clearfix">
<em><input type="button" name="button" value="添加数据" class="input-button" onclick="location.href='modify.jsp'" /></em>
<div class="title">账单管理>></div>
</div>
<form action="helplogin" method="post">
<div class="content">
<table class="box">
<tr>
<td class="field">供应商编号:</td>
<td><input type="text" name="gysid" value="${gysbean.gys_id }"/></td>
</tr>
<tr>
<td class="field">供应商名称:</td>
<td><input type="text" name="gysname" value="${gysbean.gys_name }"/></td>
</tr>
<tr>
<td class="field">供应商联系:</td>
<td><input type="text" name="gyslianxi" value="${gysbean.gys_lianxiren }"/></td>
</tr>
<tr>
<td class="field">供应商电话:</td>
<td><input type="text" name="gysphone" value="${gysbean.gys_phone }"/></td>
</tr>
<tr>
<td class="field">供应商传真:</td>
<td><input type="text" name="gyschuanzhen" value="${gysbean.gys_chuanzhen }"/></td>
</tr>
<tr>
<td class="field">供应商地址:</td>
<td><input type="text" name="gysaddress" value="${gysbean.gys_address }"/></td>
</tr>
<tr>
<td class="field">供应商描述:</td>
<td><textarea name="gysmiaoshu" cols="40" rows="6">${gysbean.gys_miaoshu }</textarea></td>
<td><font color="#FF0000" size="+2">${info.msg}</font></td>
</tr>
</table>
</div>
<div class="buttons">
<input type="button" value="返 回" class="input-button" onclick="history.back();" />
<input type="submit" name="opg" value="修 改" class="input-button" />
<input type="submit" name="opg" value="删 除" class="input-button" />
</div>
</form>
</div>
</body>
</html>
admin_top.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<body>
<div id="header">
<div class="title"></div>
<div class="welcome">欢迎您:${login.yh_username}</div>
</div>
</body>
</html>
admin_user_add.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script src="js/yongHuTianJia.js"></script>
</head>
<body>
<div class="main">
<div class="optitle clearfix">
<div class="title">账单管理>></div>
</div>
<form action="helplogin" method="post" onSubmit="return check();">
<input type="hidden" name="op" value="YHAdd"/>
<div class="content">
<table class="box">
<tr>
<td class="field">用户编号:</td>
<td><input type="text" name="yhid" id="yhid" onBlur="checkYhid();"/><font color="#FF0000">*<span id="yhidMsg"></span></font></td>
</tr>
<tr>
<td class="field">用户名称:</td>
<td><input type="text" name="yhname" id="yhname" onBlur="checkYhname();" /><font color="#FF0000">*<span id="yhnameMsg"></span></font></td>
</tr>
<tr>
<td class="field">用户密码:</td>
<td><input type="password" name="yhpassword" id="yhpassword" onBlur="checkYhpassword();"/><font color="#FF0000">*<span id="yhpasswordMsg"></span></font></td>
</tr>
<tr>
<td class="field">确认密码:</td>
<td><input type="password" name="yhpassword1" id="yhpassword1" onBlur="checkYhpassword1();"/><font color="#FF0000">*<span id="yhpassword1Msg"></span></font></td>
</tr>
<tr>
<td class="field">用户年龄:</td>
<td><input type="text" name="yhage" id="yhage" onBlur="checkYhage();"/><font color="#FF0000">*<span id="yhageMsg"></span></font></td>
</tr>
<tr>
<td class="field">用户电话:</td>
<td><input type="text" name="yhphone" id="yhphone" onBlur="checkYhphone();"/><font color="#FF0000">*<span id="yhphoneMsg"></span></font></td>
</tr>
<tr>
<td class="field">用户地址:</td>
<td><textarea name="yhaddress" cols="40" rows="6"></textarea></td>
</tr>
<tr>
<td class="field">用户性别:</td>
<td><select name="yhsex"><option value="男">男</option><option value="女" selected>女</option>
</select>
</td>
<tr/>
<tr>
<td class="field">用户权限:</td>
<td><input type="radio" name="yhquanxian" value="普通用户" checked/>普通用户
<input type="radio" name="yhquanxian" value="经理" />经理
</td>
<td><font color="#FF0000" size="+2">${info.msg}</font></td>
</tr>
</table>
</div>
<div class="buttons">
<input type="submit" name="submit" value="提 交" class="input-button" />
<input type="button" name="button" value="返 回" class="input-button" onclick="history.back();" />
</div>
</form>
</div>
</body>
</html>
admin_user_list.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<body>
<div class="menu">
<form method="post" action="helplogin">
用户名称:<input type="text" name="yhname"/>
<input type="submit" value="查询" name="opyh"/>
</form>
</div>
<div class="main">
<div class="optitle clearfix">
<em><input type="button" name="addnumber" value="添加数据" class="input-button" onclick="location.href='admin_user_add.jsp'" /></em>
<div class="title">账单管理>></div>
</div>
<div class="content">
<table class="list">
<tr>
<td>编号</td>
<td>用户名称</td>
<!-- <td>密码</td> -->
<td>性别</td>
<td>年龄</td>
<td>电话</td>
<td>地址</td>
<td>权限</td>
</tr>
<c:forEach var="yhbean" items="${list}">
<tr>
<td>${yhbean.yh_id}</td>
<td><a href="helplogin?op=YHXinXi&id=${yhbean.yh_id}">${yhbean.yh_username}</a></td>
<td>${yhbean.yh_sex}</td>
<td>${yhbean.yh_age}</td>
<td>${yhbean.yh_phone}</td>
<td>${yhbean.yh_address}</td>
<td>${yhbean.yh_quanxian}</td>
</tr>
</c:forEach>
</table>
</div>
</div>
</body>
</html>
admin_user_update_password.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<body>
<div class="menu">
<form method="get" action="">
商品名称:<input type="text" name="productName" class="input-text" />
是否付款:<select name="payStatus">
<option value="">请选择</option>
<option value="是">是</option>
<option value="否">否</option>
</select>
<input type="submit" name="submit" value="组合查询" class="button" />
</form>
</div>
<div class="main">
<div class="optitle clearfix">
<div class="title">账单管理>></div>
</div>
<form action="helplogin" method="post">
<input type="hidden" name="yhid" value="${yh_id}"/>
<div class="content">
<table class="box">
<tr>
<td class="field">旧的密码:</td>
<td><input type="password" name="yholdpassword"/></td>
</tr>
<tr>
<td class="field">新的密码:</td>
<td><input type="password" name="yhnewpassword"/></td>
</tr>
<tr>
<td class="field">确认密码:</td>
<td><input type="password" name="yhpassword1"/></td>
<td><font color="#FF0000" size="+2">${info.msg}</font></td>
</tr>
</table>
</div>
<div class="buttons">
<input type="submit" name="op" value="修改密码" class="input-button" />
<input type="button" name="button" value="返回" class="input-button" onclick="history.back();" />
</div>
</form>
</div>
</body>
</html>
admin_user_update.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<body>
<div class="main">
<div class="optitle clearfix">
<div class="title">账单管理>></div>
</div>
<form action="helplogin" method="post">
<div class="content">
<table class="box">
<tr>
<td class="field">用户编号:</td>
<td><input type="text" name="yhid" value="${yhbean.yh_id }"/></td>
</tr>
<tr>
<td class="field">用户名称:</td>
<td><input type="text" name="yhname" value="${yhbean.yh_username }"/></td>
</tr>
<tr>
<td class="field">用户年龄:</td>
<td><input type="text" name="yhage" value="${yhbean.yh_age }"/></td>
</tr>
<tr>
<td class="field">用户电话:</td>
<td><input type="text" name="yhphone" value="${yhbean.yh_phone }"/></td>
</tr>
<tr>
<td class="field">用户地址:</td>
<td><textarea name="yhaddress" cols="40" rows="6">${yhbean.yh_address }</textarea></td>
</tr>
<tr>
<td class="field">用户性别:</td>
<td><select name="yhsex"><option value="男">男</option>
<option value="女" >女</option>
<option value="${yhbean.yh_sex }" selected>${yhbean.yh_sex }</option>
</select>
</td>
<tr/>
<tr>
<td class="field">用户权限:</td>
<td>${yhbean.yh_quanxian } </td>
<td><font color="#FF0000" size="+2">${info.msg}</font></td>
</tr>
</table>
</div>
<div class="buttons">
<input type="button" name="button" value="返 回" class="input-button" onclick="history.back();" />
<input type="submit" name="opyh" value="修 改" class="input-button" />
<input type="submit" name="opyh" value="删 除" class="input-button" />
<input type="submit" name="opyh" value="修改密码" class="input-button" />
</div>
</form>
</div>
</body>
</html>
welcome.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>超市账单管理系统</title>
</head>
<body>
<center>
<font color="red"><h1>${info.msg}</h1>
<p><h1>欢迎访问超市账单管理系统</h1></p>
</font>
</center>
</body>
</html>
[源代码打包下载]
初级程序员
by: 云代码会员 发表于:2019-06-14 11:44:12 顶(0) | 踩(0) 回复
jghj
回复评论