threecat-up 3 years ago
parent 5901b128cd
commit d126a5072b

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<descriptors>
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/web/WEB-INF/web.xml" />
</descriptors>
<webroots>
<root url="file://$MODULE_DIR$/web" relative="/" />
</webroots>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Tomcat 9.0.35" level="application_server_libraries" />
<orderEntry type="library" name="taglibs-standard-impl-1.2.1" level="project" />
<orderEntry type="library" name="junit-4.12" level="project" />
<orderEntry type="library" name="commons-beanutils-1.8.0" level="project" />
<orderEntry type="library" name="gson-2.2.4" level="project" />
</component>
</module>

@ -0,0 +1,6 @@
username=root
password=Y13320567524
url=jdbc:mysql://localhost:3306/book?characterEncoding=utf8
driverClassName=com.mysql.jdbc.Driver
initialSize=5
maxActive=10

@ -0,0 +1,123 @@
<?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" 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>UserServlet</servlet-name>
<servlet-class>com.yj.web.UserServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UserServlet</servlet-name>
<url-pattern>/userServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>BookServlet</servlet-name>
<servlet-class>com.yj.web.BookServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>BookServlet</servlet-name>
<url-pattern>/manager/bookServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>ClientBookServlet</servlet-name>
<servlet-class>com.yj.web.ClientBookServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ClientBookServlet</servlet-name>
<url-pattern>/client/bookServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>KaptchaServlet</servlet-name>
<servlet-class>com.google.code.kaptcha.servlet.KaptchaServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>KaptchaServlet</servlet-name>
<url-pattern>/kaptcha.jpg</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>CartServlet</servlet-name>
<servlet-class>com.yj.web.CartServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CartServlet</servlet-name>
<url-pattern>/cartServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>ClientOrderServlet</servlet-name>
<servlet-class>com.yj.web.ClientOrderServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ClientOrderServlet</servlet-name>
<url-pattern>/client/orderServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>ManagerOrderServlet</servlet-name>
<servlet-class>com.yj.web.ManagerOrderServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ManagerOrderServlet</servlet-name>
<url-pattern>/manager/orderServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>PayServlet</servlet-name>
<servlet-class>com.yj.web.PayServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PayServlet</servlet-name>
<url-pattern>/payServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>ManagerUserServlet</servlet-name>
<servlet-class>com.yj.web.ManagerUserServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ManagerUserServlet</servlet-name>
<url-pattern>/manager/UserServlet</url-pattern>
</servlet-mapping>
<filter>
<filter-name>ManagerFilter</filter-name>
<filter-class>com.yj.filter.ManagerFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ManagerFilter</filter-name>
<url-pattern>/pages/manager/*</url-pattern>
<url-pattern>/manager/bookServlet</url-pattern>
</filter-mapping>
<filter>
<filter-name>TransactionFilter</filter-name>
<filter-class>com.yj.filter.TransactionFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>TransactionFilter</filter-name>
<!-- /*表示当前工程下所有请求 -->
<url-pattern>/*</url-pattern>
</filter-mapping>
<error-page>
<!-- error-code是错误类型-->
<error-code>404</error-code>
<!-- location标签表示要跳转去的页面路径-->
<location>/pages/error/error404.jsp</location>
</error-page>
<error-page>
<!-- error-code是错误类型-->
<error-code>500</error-code>
<!-- location标签表示要跳转去的页面路径-->
<location>/pages/error/error500.jsp</location>
</error-page>
</web-app>

@ -0,0 +1,2 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:forward page="/client/bookServlet?action=page"></jsp:forward>

@ -0,0 +1,87 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>购物车</title>
<%@include file="/pages/common/header.jsp"%>
<script type="text/javascript">
$(function () {
$("a.deleteItem").click(function () {
return confirm("你确定要删除【"+$(this).parent().parent().find("td:first").text() +"】么?");
});
$("#clearCart").click(function () {
return confirm("你确定要清空购物车么?");
});
$(".updateCount").change(function () {
var name = $(this).parent().parent().find("td:first").text();
var count = this.value;
var id = $(this).attr("bookId");
if(confirm("你确定要修改【"+name+"】数量为"+count+"么?")) {
location.href="http://localhost:8080/bookstore1/cartServlet?action=updateCount&count="+count+"&id="+id;
} else {
this.value = this.defaultValue;
}
})
});
</script>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo.jpg" >
<span class="wel_word">购物车</span>
<%@include file="/pages/common/login_success_menu.jsp"%>
</div>
<div id="main">
<table>
<tr>
<td>商品名称</td>
<td>数量</td>
<td>单价</td>
<td>金额</td>
<td>操作</td>
</tr>
<c:if test="${empty sessionScope.cart.items}">
<tr>
<td colspan="5"><a href="index.jsp">亲,当前购物车为空,快去和小伙伴浏览书籍吧! </a> </td>
</tr>
</c:if>
<c:if test="${not empty sessionScope.cart.items}">
<c:forEach items="${sessionScope.cart.items}" var="entry">
<tr>
<td>${entry.value.name}</td>
<td>
<input class="updateCount" style="width: 70px;" bookId="${entry.value.id}" type="text" value="${entry.value.count}">
</td>
<td>${entry.value.price}</td>
<td>${entry.value.totalPrice}</td>
<td><a class="deleteItem" href="cartServlet?action=deleteItem&id=${entry.value.id}">删除</a></td>
</tr>
</c:forEach>
</c:if>
</table>
<c:if test="${not empty sessionScope.cart.items}">
<div class="cart_info">
<span class="cart_span">购物车中共有<span class="b_count">${sessionScope.cart.totalCount}</span>本书籍</span>
<span class="cart_span">总金额<span class="b_price">${sessionScope.cart.totalPrice}</span>元</span>
<span class="cart_span"><a id="clearCart" href="cartServlet?action=clearItem">清空购物车</a></span>
<span class="cart_span"><a href="client/orderServlet?action=isLogin">去结账</a></span>
</div>
</c:if>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,32 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>结算页面</title>
<%@include file="/pages/common/header.jsp"%>
<style type="text/css">
h1 {
text-align: center;
margin-top: 200px;
}
</style>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo.jpg" >
<span class="wel_word">结算</span>
<%@include file="/pages/common/login_success_menu.jsp"%>
</div>
<div id="main">
<h1>你的订单已结算,订单号为${sessionScope.orderId},店主很快就会发货啦!</h1>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,78 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/5
Time: 14:50
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>结算页面</title>
<%@include file="/pages/common/header.jsp"%>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo.jpg" >
<span class="wel_word">结算</span>
<%@include file="/pages/common/login_success_menu.jsp"%>
</div>
</head>
<body>
<div id="main">
<form action="client/orderServlet?action=createOrder" method="post">
<input type="hidden">
<table width="80%">
<tr>
<td bgcolor="#F7FEFF" colspan="4">
支付金额:<INPUT id="money" TYPE="text" NAME="money" size="6" value="${sessionScope.cart.totalPrice}">元</td>
</tr>
<tr>
<td><br />
</td>
</tr>
<tr>
<td colspan="4">请您选择在线支付银行</td>
</tr>
<tr>
<td><INPUT TYPE="radio" NAME="pd_FrpId" value="CMBCHINA-NET">招商银行
</td>
<td><INPUT TYPE="radio" NAME="pd_FrpId" value="ICBC-NET">工商银行</td>
<td><INPUT TYPE="radio" NAME="pd_FrpId" value="ABC-NET">农业银行</td>
<td><INPUT TYPE="radio" NAME="pd_FrpId" value="CCB-NET">建设银行
</td>
</tr>
<tr>
<td><INPUT TYPE="radio" NAME="pd_FrpId" value="CMBC-NET">中国民生银行总行</td>
<td><INPUT TYPE="radio" NAME="pd_FrpId" value="CEB-NET">光大银行
</td>
<td><INPUT TYPE="radio" NAME="pd_FrpId" value="BOCO-NET">交通银行</td>
<td><INPUT TYPE="radio" NAME="pd_FrpId" value="SDB-NET">深圳发展银行</td>
</tr>
<tr>
<td><INPUT TYPE="radio" NAME="pd_FrpId" value="BCCB-NET">北京银行</td>
<td><INPUT TYPE="radio" NAME="pd_FrpId" value="CIB-NET">兴业银行
</td>
<td><INPUT TYPE="radio" NAME="pd_FrpId" value="SPDB-NET">上海浦东发展银行
</td>
<td><INPUT TYPE="radio" NAME="pd_FrpId" value="ECITIC-NET">中信银行</td>
</tr>
<tr>
<td><br />
</td>
</tr>
<tr>
<td colspan="4"><INPUT TYPE="submit" value="确定支付">
</td>
</tr>
</table>
</form>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</body>
</html>

@ -0,0 +1,130 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/5
Time: 15:44
To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>书城首页</title>
<%@include file="/pages/common/header.jsp"%>
<script type="text/javascript">
$(function () {
//给加入购物车绑定单击事件
$("button.addToCart").click(function () {
var bookId = $(this).attr("bookId");
//发ajax请求添加商品到购物车
$.getJSON("http://localhost:8080/Book/cartServlet", "action=ajaxAddItem&id=" + bookId, function (data) {
$("#cartTotalCount").text("您的购物车中有" + data.totalCount + "件商品");
$("#cartLastName").html("您刚刚将【" + data.lastName + "】加入到了购物车中");
});
});
});
</script>
</head>
<body>
${sessionScope.lastName}
<div id="header">
<img class="logo_img" alt="" src="static/img/logo1.jpg" >
<span class="wel_word">Bookstore</span>
<div>
<c:if test="${empty sessionScope.user}">
<a href="pages/user/login.jsp">登录</a> |
<a href="pages/user/regist.jsp">注册</a> &nbsp;&nbsp;
<a href="client/bookServlet?action=pageOrder">热榜</a>
</c:if>
<c:if test="${not empty sessionScope.user}">
<span>欢迎<span class="um_span">${sessionScope.user.username}</span>光临书城</span>
<a href="client/orderServlet?action=myOrders">我的订单</a>
<a href="pages/user/userinfo.jsp">个人信息</a>
<a href="userServlet?action=logout">注销</a>&nbsp;&nbsp;
</c:if>
<a href="pages/cart/cart.jsp">购物车</a>
<a href="pages/manager/manager.jsp">后台管理</a>
</div>
</div>
<div id="main">
<div class="book_check">
<form action="client/bookServlet" method="get">
<input type="hidden" name="action" value="pageByNameOrAuthor">
图书搜索<input id="nameorauthor" type="text" placeholder="请输入书名或作者名" name="nameorauthor" value="${param.nameorauthor}">
<input type="submit" value="查询" />
</form>
</div>
<div id="book">
<div class="book_cond">
<form action="client/bookServlet" method="get">
<input type="hidden" name="action" value="pageByPrice">
价格:<input id="min" type="text" name="min" value="${param.min}"> 元 -
<input id="max" type="text" name="max" value="${param.max}"> 元
<input type="submit" value="查询" />
</form>
</div>
<div style="text-align: center">
<c:if test="${empty sessionScope.cart.items}">
<span id="cartTotalCount"></span>
<div>
<span style="color: red" id="cartLastName">当前购物车为空</span>
</div>
</c:if>
<c:if test="${not empty sessionScope.cart.items}">
<span id="cartTotalCount">您的购物车中有${sessionScope.cart.totalCount}件商品</span>
<div>
您刚刚将<span style="color: red" id="cartLastName">${sessionScope.lastName}</span>加入到了购物车中
</div>
</c:if>
</div>
<c:forEach items="${requestScope.page.items}" var="book">
<div class="b_list">
<div class="img_div">
<img class="book_img" alt="" src="${book.imgPath}" />
</div>
<div class="book_info">
<div class="book_name">
<span class="sp1">书名:</span>
<span class="sp2">${book.name}</span>
</div>
<div class="book_author">
<span class="sp1">作者:</span>
<span class="sp2">${book.author}</span>
</div>
<div class="book_price">
<span class="sp1">价格:</span>
<span class="sp2">¥${book.price}</span>
</div>
<div class="book_sales">
<span class="sp1">销量:</span>
<span class="sp2">${book.sales}</span>
</div>
<div class="book_amount">
<span class="sp1">库存:</span>
<span class="sp2">${book.stock}</span>
</div>
<div class="book_add">
<button bookId=${book.id} class="addToCart">加入购物车</button>
</div>
</div>
</div>
</c:forEach>
</div>
<%@include file="/pages/common/page_nav.jsp"%>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,64 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/19
Time: 22:56
To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>图书热销榜单</title>
<%@include file="/pages/common/header.jsp"%>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo1.jpg" >
<span class="wel_word">图书热销榜单</span>
<div>
<span>欢迎光临书店</span>
<a href="index.jsp">返回</a>
</div>
</div>
<div id="main">
<table style="height: 350px">
<tr>
<td>排名</td>
<td>书名</td>
<td>价格</td>
<td>作者</td>
<td style="color: red">销量</td>
</tr>
<%!int i=1;%>
<c:forEach items="${requestScope.page.items}" var="book">
<tr>
<td><%=i++%></td>
<td>${book.name}</td>
<td>${book.price}</td>
<td>${book.author}</td>
<td style="color: red">${book.sales}</td>
</tr>
</c:forEach>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,13 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/3
Time: 11:07
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div id="bottom">
<span>
RentBookstore &copy;2020
</span>
</div>

@ -0,0 +1,23 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/5
Time: 11:06
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
String basePath = request.getScheme()
+"://"
+request.getServerName()
+":"
+request.getServerPort()
+request.getContextPath()
+"/";
pageContext.setAttribute("bastPath",basePath);
%>
<!-- 写base标签永远固定相对路径跳转的结果 -->
<base href=<%=basePath%>>
<link type="text/css" rel="stylesheet" href="static/css/style.css" >
<script type="text/javascript" src="static/script/jquery-1.7.2.js"></script>

@ -0,0 +1,16 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/5
Time: 11:07
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div>
<span>欢迎<span class="um_span">${sessionScope.user.username}</span>光临书店</span>
<a href="client/orderServlet?action=myOrders">我的订单</a>
<a href="pages/user/userinfo.jsp">个人信息</a>
<a href="client/bookServlet?action=pageOrder">热榜</a>
<a href="userServlet?action=logout">注销</a>&nbsp;&nbsp;
<a href="index.jsp">返回</a>
</div>

@ -0,0 +1,16 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/5
Time: 11:08
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div>
<a href="manager/bookServlet?action=page">图书管理</a>
<a href="manager/orderServlet?action=orders">订单管理</a>
<a href="manager/UserServlet?action=page">用户管理</a>
<a href="manager/orderServlet?action=showTotal">总账单</a>
<a href="index.jsp">返回书店
</a>
</div>

@ -0,0 +1,81 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/5
Time: 16:15
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div id="page_nav">
<a href="${requestScope.page.url}&pageNo=1">首页</a>
<c:if test="${requestScope.page.pageNo>1}">
<a href="${requestScope.page.url}&pageNo=${requestScope.page.pageNo-1}">上一页</a>
</c:if>
<c:choose>
<%-- 当总页码小于等于5的情况 --%>
<c:when test="${ requestScope.page.pageTotal <= 5 }">
<c:set var="begin" value="1"></c:set>
<c:set var="end" value="${ requestScope.page.pageTotal }"></c:set>
</c:when>
<c:otherwise>
<%-- 当总页码大于5的情况 --%>
<c:choose>
<%-- 当前页码是前三 --%>
<c:when test="${ requestScope.page.pageNo <= 3 }">
<c:set var="begin" value="1"></c:set>
<c:set var="end" value="5"></c:set>
</c:when>
<%-- 当前页码是后三 --%>
<c:when test="${ requestScope.page.pageNo >= requestScope.page.pageTotal - 2 }">
<c:set var="begin" value="${ requestScope.page.pageTotal - 4 }"></c:set>
<c:set var="end" value="${ requestScope.page.pageTotal }"></c:set>
</c:when>
<c:otherwise>
<c:set var="begin" value="${ requestScope.page.pageNo - 2 }"></c:set>
<c:set var="end" value="${ requestScope.page.pageNo + 2 }"></c:set>
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
<c:forEach begin="${ begin }" end="${ end }" var="i">
<c:if test="${ i == requestScope.page.pageNo }">【${ i }】</c:if>
<c:if test="${ i != requestScope.page.pageNo }"><a href="${requestScope.page.url}&pageNo=${i}">${i}</a></c:if>
</c:forEach>
<c:if test="${requestScope.page.pageNo<requestScope.page.pageTotal}">
<a href="${requestScope.page.url}&pageNo=${requestScope.page.pageNo+1}">下一页</a>
</c:if>
<a href="${requestScope.page.url}&pageNo=${requestScope.page.pageTotal}">末页</a>
共${requestScope.page.pageTotal}页,${requestScope.page.pageTotalCount}条记录
到第<input value="${param.pageNo}" name="pn" id="pn_input"/>页
<input id="searchPageBtn" type="button" value="确定">
<script type="text/javascript">
$(function () {
$("#searchPageBtn").click(function () {
var pageNo = $("#pn_input").val()
var pageTotal = ${requestScope.page.pageTotal}
if(pageNo<1) pageNo=1
if(pageNo>pageTotal) pageNo=pageTotal
location.href="${requestScope.basePath}${requestScope.page.url}&pageNo="+pageNo;
});
});
</script>
</div>

@ -0,0 +1,37 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/5
Time: 22:17
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>404</title>
<%@include file="/pages/common/header.jsp"%>
</head>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo.gif" >
<span class="wel_word">404error</span>
</div>
<div id="main">
<table>
<tr>
<td style="width: 300px">亲,您访问的页面不存在或已被删除!</td>
</tr>
<tr>
<td>
<a href="index.jsp" style="size: 300px;color: red">返回首页</a>
</td>
</tr>
</table>
</div>
<!-- 这是页脚的引入 -->
<%@ include file="/pages/common/footer.jsp" %>
</body>
</html>

@ -0,0 +1,37 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/5
Time: 22:17
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>500</title>
<%@include file="/pages/common/header.jsp"%>
</head>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo.gif" >
<span class="wel_word">500error</span>
</div>
<div id="main">
<table>
<tr>
<td style="width: 300px">HTTP状态 500 - 内部服务器错误</td>
</tr>
<tr>
<td>
<a href="index.jsp" style="size: 300px;color: red">返回首页</a>
</td>
</tr>
</table>
</div>
<!-- 这是页脚的引入 -->
<%@ include file="/pages/common/footer.jsp" %>
</body>
</html>

@ -0,0 +1,38 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/5
Time: 10:45
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>404</title>
<%@include file="/pages/common/header.jsp"%>
</head>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo.gif" >
<span class="wel_word">错误提示</span>
</div>
<div id="main">
<table>
<tr>
<td style="width: 300px">亲,你没有管理员权限哦!</td>
</tr>
<tr>
<td>
<a href="pages/user/login.jsp" style="size: 300px;color: red">管理员登录</a>
<a href="index.jsp" style="size: 300px;color: red">返回首页</a>
</td>
</tr>
</table>
</div>
<!-- 这是页脚的引入 -->
<%@ include file="/pages/common/footer.jsp" %>
</body>
</html>

@ -0,0 +1,60 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>编辑图书</title>
<%@include file="/pages/common/header.jsp"%>
<style type="text/css">
h1 {
text-align: center;
margin-top: 200px;
}
h1 a {
color:red;
}
input {
text-align: center;
}
</style>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo1.jpg" >
<span class="wel_word">编辑图书</span>
<%@include file="/pages/common/manager_menu.jsp"%>
</div>
<div id="main">
<form action="manager/bookServlet" method="post">
<input type="hidden" name="pageNo" value="${param.pageNo}">
<input type="hidden" name="action" value="${empty param.id ? "add":"update"}"/>
<input type="hidden" name="id" value="${requestScope.book.id}"/>
<table>
<tr>
<td>名称</td>
<td>价格</td>
<td>作者</td>
<td>销量</td>
<td>库存</td>
<td colspan="2">操作</td>
</tr>
<tr>
<td><input name="name" type="text" value="${requestScope.book.name}"/></td>
<td><input name="price" type="text" value="${requestScope.book.price}"/></td>
<td><input name="author" type="text" value="${requestScope.book.author}"/></td>
<td><input name="sales" type="text" value="${requestScope.book.sales}"/></td>
<td><input name="stock" type="text" value="${requestScope.book.stock}"/></td>
<td><input type="submit" value="提交"/></td>
</tr>
</table>
</form>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,69 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>图书管理</title>
<%@include file="/pages/common/header.jsp"%>
<script type="text/javascript">
$(function () {
//给删除的a标签绑定单击事件用于删除提示
$("a.deleteClass").click(function () {
/**
* 返回true表示确认
*/
return confirm("你确定要删除【"+$(this).parent().parent().find("td:first").text()+"】?");
})
})
</script>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo1.jpg" >
<span class="wel_word">图书管理</span>
<%@include file="/pages/common/manager_menu.jsp"%>
</div>
<div id="main">
<table style="height: 350px">
<tr>
<td>名称</td>
<td>价格</td>
<td>作者</td>
<td>销量</td>
<td>库存</td>
<td colspan="2">操作</td>
</tr>
<c:forEach items="${requestScope.page.items}" var="book">
<tr>
<td>${book.name}</td>
<td>${book.price}</td>
<td>${book.author}</td>
<td>${book.sales}</td>
<td>${book.stock}</td>
<td><a href="manager/bookServlet?&action=getBook&id=${book.id}&pageNo=${requestScope.page.pageNo}">修改</a></td>
<td><a class="deleteClass" href="manager/bookServlet?action=delete&id=${book.id}&pageNo=${requestScope.page.pageNo}">删除</a></td>
</tr>
</c:forEach>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><a href="pages/manager/book_edit.jsp?pageNo=${requestScope.page.pageTotal}">添加图书</a></td>
</tr>
</table>
<%@include file="/pages/common/page_nav.jsp"%>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,29 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>后台管理</title>
<%@include file="/pages/common/header.jsp"%>
<style type="text/css">
h1 {
text-align: center;
margin-top: 200px;
}
</style>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo1.jpg" >
<span class="wel_word">后台管理系统</span>
<%@include file="/pages/common/manager_menu.jsp"%>
</div>
<div id="main">
<h1>欢迎管理员进入后台管理系统</h1>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,58 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>订单管理</title>
<%@include file="/pages/common/header.jsp"%>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo.gif" >
<span class="wel_word">订单管理系统</span>
<!-- 这是manager管理模块的共同菜单 -->
<%@ include file="/pages/common/manager_menu.jsp" %>
</div>
<div id="main">
<table>
<tr>
<td>订单号</td>
<td>日期</td>
<td>金额</td>
<td>详情</td>
<td>发货</td>
</tr>
<c:forEach items="${requestScope.orders}" var="order">
<tr>
<td>${order.orderId}</td>
<td>${order.createTime}</td>
<td>${order.price}</td>
<td>
<c:choose>
<c:when test="${order.status==0}">
<a href="manager/orderServlet?action=sendOrder&orderId=${ order.orderId }">确认发货</a>
</c:when>
<c:when test="${order.status == 1}">
等待用户签收
</c:when>
<c:when test="${order.status == 2}">
已签收
</c:when>
</c:choose>
</td>
<td><a href="client/orderServlet?action=showOrderItem&orderId=${order.orderId}">查看详情</a></td>
</tr>
</c:forEach>
</table>
</div>
<!-- 这是页脚的引入 -->
<%@ include file="/pages/common/footer.jsp" %>
</body>
</html>

@ -0,0 +1,61 @@
<%@ page import="java.util.Date" %><%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/19
Time: 22:58
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>总账单</title>
<%@include file="/pages/common/header.jsp"%>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo.gif" >
<span class="wel_word">总账单</span>
<!-- 这是manager管理模块的共同菜单 -->
<%@ include file="/pages/common/manager_menu.jsp" %>
</div>
<%
String usernumber=request.getParameter("usernumber");
String ordernumber = request.getParameter("ordernumber");
String booknumbers = request.getParameter("booknumbers");
String bigDecimal = request.getParameter("bigDecimal");
%>
<div id="main">
<table>
<tr style="color: red">尊敬的管理员:</tr>
<tr>
<td colspan="2">截止<%=new Date()%>账单详情:</td>
</tr>
<tr>
<td>用户总数:</td>
<td>${usernumber}人</td>
</tr>
<tr>
<td>总订单数:</td>
<td>${ordernumber}单</td>
</tr>
<tr>
<td>销售本数:</td>
<td>${booknumbers}本</td>
</tr>
<tr>
<td>总收入:</td>
<td>${bigDecimal}元</td>
</tr>
</table>
</div>
<!-- 这是页脚的引入 -->
<%@ include file="/pages/common/footer.jsp" %>
</body>
</html>

@ -0,0 +1,67 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/20
Time: 15:30
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>编辑用户信息</title>
<%@include file="/pages/common/header.jsp"%>
<style type="text/css">
h1 {
text-align: center;
margin-top: 200px;
}
h1 a {
color:red;
}
input {
text-align: center;
}
</style>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo1.jpg" >
<span class="wel_word">编辑用户信息</span>
<%@include file="/pages/common/manager_menu.jsp"%>
</div>
<div id="main">
<form action="manager/UserServlet" method="post">
<input type="hidden" name="pageNo" value="${param.pageNo}">
<input type="hidden" name="action" value="${empty param.id ? "add":"update"}"/>
<input type="hidden" name="id" value="${requestScope.user.id}"/>
<table>
<tr>
<td>序号</td>
<td>用户名</td>
<td>密码</td>
<td>电子邮箱</td>
<td>收货地址</td>
<td colspan="2">操作</td>
</tr>
<tr>
<td><input name="id" type="text" value="${requestScope.user.id}"/></td>
<td><input name="username" type="text" value="${requestScope.user.username}"/></td>
<td><input name="password" type="text" value="${requestScope.user.password}"/></td>
<td><input name="email" type="text" value="${requestScope.user.email}"/></td>
<td><input name="address" type="text" value="${requestScope.user.address}"/></td>
<td><input type="submit" value="提交"/></td>
</tr>
</table>
</form>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,76 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/20
Time: 20:27
To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>用户管理</title>
<%@include file="/pages/common/header.jsp"%>
<script type="text/javascript">
$(function () {
//给删除的a标签绑定单击事件用于删除提示
$("a.deleteClass").click(function () {
/**
* 返回true表示确认
*/
return confirm("你确定要删除【"+$(this).parent().parent().find("td:first").text()+"】用户吗?");
})
})
</script>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo1.jpg" >
<span class="wel_word">用户管理</span>
<%@include file="/pages/common/manager_menu.jsp"%>
</div>
<div id="main">
<table style="height: 350px">
<tr>
<td>序号</td>
<td>用户名</td>
<td>密码</td>
<td>电子邮箱</td>
<td>收货地址</td>
<td colspan="2">操作</td>
</tr>
<c:forEach items="${requestScope.page.items}" var="user">
<tr>
<td>${user.id}</td>
<td>${user.username}</td>
<td>${user.password}</td>
<td>${user.email}</td>
<td>${user.address}</td>
<td><a href="manager/UserServlet?&action=getUser&id=${user.id}&pageNo=${requestScope.page.pageNo}">修改信息</a></td>
<td><a class="deleteClass" href="manager/UserServlet?action=delete&id=${user.id}&pageNo=${requestScope.page.pageNo}">删除信息</a></td>
</tr>
</c:forEach>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><a href="pages/manager/user_edit.jsp?pageNo=${requestScope.page.pageTotal}">添加用户</a></td>
</tr>
</table>
<%@include file="/pages/common/page_nav.jsp"%>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>k

@ -0,0 +1,61 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/5
Time: 16:30
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>我的订单</title>
<%@include file="/pages/common/header.jsp"%>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo.gif" >
<span class="wel_word">我的订单</span>
<!-- 登录成功之后所有相同的菜单 -->
<%@ include file="/pages/common/login_success_menu.jsp" %>
</div>
<div id="main">
<table>
<tr>
<td>日期</td>
<td>金额</td>
<td>状态</td>
<td>详情</td>
</tr>
<c:forEach items="${requestScope.myOrders}" var="order">
<tr>
<td>${ order.createTime }</td>
<td>${ order.price }</td>
<td>
<c:choose>
<c:when test="${ order.status == 0 }">
未发货
</c:when>
<c:when test="${ order.status == 1 }">
<a href="client/orderServlet?action=receivedOrder&orderId=${ order.orderId }">确认收货</a>
</c:when>
<c:when test="${ order.status == 2 }">
已收货
</c:when>
</c:choose>
</td>
<td><a href="client/orderServlet?action=showOrderItem&orderId=${ order.orderId }">查看详情</a></td>
</tr>
</c:forEach>
</table>
</div>
<!-- 这是页脚的引入 -->
<%@ include file="/pages/common/footer.jsp" %>
</body>
</html>

@ -0,0 +1,53 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/5
Time: 0:17
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>我的订单</title>
<%@include file="/pages/common/header.jsp"%>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo.gif" >
<span class="wel_word">我的订单</span>
<!-- 登录成功之后所有相同的菜单 -->
<%@ include file="/pages/common/login_success_menu.jsp" %>
</div>
<div id="main">
<table>
<tr>
<td>编号</td>
<td>书名</td>
<td>数量</td>
<td>单价</td>
<td>总金额</td>
<td>订单编号</td>
</tr>
<c:forEach items="${requestScope.orderItems}" var="order">
<tr>
<td>${ order.id}</td>
<td>${ order.name }</td>
<td>${ order.count }</td>
<td>${ order.price }</td>
<td>${ order.totalPrice }</td>
<td>${ order.orderId }</td>
</tr>
</c:forEach>
</table>
</div>
<!-- 这是页脚的引入 -->
<%@ include file="/pages/common/footer.jsp" %>
</body>
</html>

@ -0,0 +1,97 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录页面</title>
<%@include file="/pages/common/header.jsp"%>
<script type="text/javascript">
// 页面加载完成之后
$(function(){
// 给注册按钮添加事件
$("#sub_btn").click(function(){
// 获取用户名
var usernameValue = $("#username").val();
// 验证用户名是否合法,规则如下必须由字母数字下划线组成并且长度为5到15位。
var usernameReg = /^\w{5,15}$/;
// 验证用户信息
if (!usernameReg.test(usernameValue)) {
// 提示用户
$("span.errorMsg").text("用户名不合法!");
return false;
}
// 获取密码
var passwordValue = $("#password").val();
// 验证密码是否合法,规则如下必须由字母数字下划线组成并且长度为5到15位。
var passwordReg = /^\w{5,15}$/;
// 验证用户信息
if (!passwordReg.test(passwordValue)) {
// 提示用户
$("span.errorMsg").text("密码不合法!");
return false;
}
// 阻止表单提交
return true;
});
});
</script>
</head>
<body>
<div id="login_header">
<img class="logo_img" alt="" src="static/img/logo.jpg" >
</div>
<div class="login_banner">
<div id="l_content">
<span class="login_word">欢迎登录</span>
</div>
<div id="content">
<div class="login_form">
<div class="login_box">
<div class="tit">
<h1>书城会员</h1>
<a href="pages/user/regist.jsp">立即注册</a>
</div>
<div class="msg_cont">
<b></b>
<span class="errorMsg">
<%--<%=request.getAttribute("msg")==null?"请输入用户名和密码":request.getAttribute("msg")%>--%>
${empty requestScope.msg ? "请输入用户名和密码":requestScope.msg}
</span>
</div>
<div class="form">
<form action="userServlet" method="post">
<input type="hidden" name="action" value="login">
<label>用户名称:</label>
<input class="itxt" type="text" placeholder="请输入用户名" autocomplete="off"
tabindex="1" name="username" id="username"
value="${requestScope.username}"
/>
<br />
<br />
<label>用户密码:</label>
<input class="itxt" type="password" placeholder="请输入密码" autocomplete="off"
tabindex="1" name="password" id="password"
/>
<br />
<br />
<input type="submit" value="登录" id="sub_btn" />
</form>
</div>
</div>
</div>
</div>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,33 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录成功页面</title>
<%@include file="/pages/common/header.jsp"%>
<style type="text/css">
h1 {
text-align: center;
margin-top: 200px;
}
h1 a {
color:red;
}
</style>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo.jpg" >
<%@include file="/pages/common/login_success_menu.jsp"%>
</div>
<div id="main">
<h1>欢迎回来 <a href="index.jsp">转到主页</a></h1>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,158 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>注册页面</title>
<%@include file="/pages/common/header.jsp"%>
<script type="text/javascript">
// 页面加载完成之后
$(function(){
$("#username").blur(function () {
//1、获取用户名
var username = this.value;
$.getJSON("http://localhost:8080/bookstore1/userServlet","action=ajaxExistsusername&username="+username,function (data) {
if(data.exitsUsername) {
$("span.errorMsg").text("用户名已存在!");
} else {
$("span.errorMsg").text("用户名可用!");
}
});
});
$("#code_img").click(function () {
this.src = "${basePath}kaptcha.jpg?d=" + new Date();
});
// 给注册按钮添加事件
$("#sub_btn").click(function(){
// 获取用户名
var usernameValue = $("#username").val();
// 验证用户名是否合法,规则如下必须由字母数字下划线组成并且长度为5到15位。
var usernameReg = /^\w{5,15}$/;
// 验证用户信息
if (!usernameReg.test(usernameValue)) {
// 提示用户
$("span.errorMsg").text("用户名不合法!");
return false;
}
// 获取密码
var passwordValue = $("#password").val();
// 验证密码是否合法,规则如下必须由字母数字下划线组成并且长度为5到15位。
var passwordReg = /^\w{5,15}$/;
// 验证用户信息
if (!passwordReg.test(passwordValue)) {
// 提示用户
$("span.errorMsg").text("密码不合法!");
return false;
}
// 获取确认密码
var repwdValue = $("#repwd").val();
// 验证确认密码和密码一致
if (passwordValue != repwdValue) {
// 提示用户
$("span.errorMsg").text("确认密码和密码不一致!");
return false;
}
// 获取用户名
var emailValue = $("#email").val();
// 验证邮件输入是否合法。
var emailReg = /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/;
if (!emailReg.test(emailValue)) {
// 提示用户
$("span.errorMsg").text("邮件输入不合法!");
return false;
}
// 获取验证码信息
var codeValue = $("#code").val();
// 验证验证码不为空!
if (codeValue == "") {
$("span.errorMsg").text("验证码不能为空!")
return false;
}
return true;
});
});
</script>
<style type="text/css">
.login_form{
height:420px;
margin-top: 25px;
}
</style>
</head>
<body>
<div id="login_header">
<img class="logo_img" alt="" src="static/img/logo.jpg" >
</div>
<div class="login_banner">
<div id="l_content">
<span class="login_word">欢迎注册</span>
</div>
<div id="content">
<div class="login_form">
<div class="login_box">
<div class="tit">
<h1>注册会员</h1>
<span class="errorMsg">
<%--<%=request.getAttribute("msg")==null? "" : request.getAttribute("msg")%>--%>
${requestScope.msg}
</span>
</div>
<div class="form">
<form action="userServlet" method="post">
<input type="hidden" name="action" value="regist">
<label>用户名称:</label>
<input class="itxt" type="text" placeholder="请输入用户名" autocomplete="off" tabindex="1" name="username" id="username"
value="${requestScope.username}"/>
<br />
<br />
<label>用户密码:</label>
<input class="itxt" type="password" placeholder="请输入密码" autocomplete="off" tabindex="1" name="password" id="password"
value="${requestScope.password}"/>
<br />
<br />
<label>确认密码:</label>
<input class="itxt" type="password" placeholder="确认密码" autocomplete="off" tabindex="1" name="repwd" id="repwd"
value="${requestScope.repwd}"/>
<br />
<br />
<label>电子邮件:</label>
<input class="itxt" type="text" placeholder="请输入邮箱地址" autocomplete="off" tabindex="1" name="email" id="email"
value="${requestScope.email}"/>
<br />
<br />
<label>验证码:</label>
<input class="itxt" type="text" name="code" style="width: 80px;" id="code"/>
<img id="code_img" alt="" src="kaptcha.jpg" style="float: right; margin-right: 40px;width: 110px;height: 30px">
<br />
<br />
<input type="submit" value="注册" id="sub_btn" />
</form>
</div>
</div>
</div>
</div>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,34 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>注册成功页面</title>
<%@include file="/pages/common/header.jsp"%>
<style type="text/css">
h1 {
text-align: center;
margin-top: 200px;
}
h1 a {
color:red;
}
</style>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo.jpg" >
<span class="wel_word"></span>
<%@include file="/pages/common/login_success_menu.jsp"%>
</div>
<div id="main">
<h1>注册成功! <a href="index.jsp">转到主页</a></h1>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,65 @@
<%--
Created by IntelliJ IDEA.
User: jhu
Date: 2020/10/9
Time: 19:51
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>我的个人信息</title>
<%@include file="/pages/common/header.jsp"%>
<style type="text/css">
h1 {
text-align: center;
margin-top: 200px;
}
h1 a {
color:red;
}
input {
text-align: center;
}
</style>
</head>
<body>
<div id="header">
<img class="logo_img" alt="" src="static/img/logo1.jpg" >
<span class="wel_word">个人信息</span>
<%@include file="/pages/common/login_success_menu.jsp"%>
</div>
<div id="main">
<form action="userServlet" method="post">
<input type="hidden" name="action" value="update"/>
<table>
<tr>
<td>序号</td>
<td>用户名</td>
<td>密码</td>
<td>电子邮箱</td>
<td>收货地址</td>
<td colspan="2">修改</td>
</tr>
<tr>
<td><input name="id" type="text" value="${sessionScope.user.id}"/></td>
<td><input name="username" type="text" value="${sessionScope.user.username}"/></td>
<td><input name="password" type="text" value="${sessionScope.user.password}"/></td>
<td><input name="email" type="text" value="${sessionScope.user.email}"/></td>
<td><input name="address" type="text" value="${sessionScope.user.address}"/></td>
<td><input type="submit" value="提交"/></td>
</tr>
</table>
</form>
</div>
<%@include file="/pages/common/footer.jsp"%>
</body>
</html>

@ -0,0 +1,282 @@
@CHARSET "UTF-8";
body {
overflow: hidden;
background-color: #f3ffe5;
}
* {
margin: 0;
font-family:"Microsoft Yahei";
color: #666;
}
div{
margin: auto;
margin-bottom: 10px;
margin-top: 10px;
}
#header {
height: 82px;
width: 1200px;
}
#main {
height: 500px;
width: 1200px;
border: 1px black solid;
overflow: auto;
}
.book_check{
width: 500px;
margin-left: 20px;
}
#bottom {
height: 30px;
width: 1200px;
text-align: center;
}
#book{
width: 100%;
height: 80%;
margin: auto;
}
.b_list{
height:300px;
width:250px;
margin: 20px;
float: left;
margin-top:0px;
margin-bottom:0px;
border: 1px #e3e3e3 solid;
}
#page_nav{
width: 100%;
height: 10px;
margin: auto;
text-align: center;
}
#pn_input {
width: 30px;
text-align: center;
}
.img_div{
height: 150px;
text-align: center;
}
.book_img {
height:150px;
width:150px;
}
.book_info {
text-align: center;
}
.book_info div{
height: 10px;
width: 300px;
text-align: left;
}
.wel_word{
font-size: 60px;
float: left;
}
.logo_img{
float: left;
}
#header div a {
text-decoration: none;
font-size: 20px;
}
#header div{
float: right;
margin-top: 55px;
}
.book_cond{
margin-left: 500px;
}
.book_cond input{
width: 50px;
text-align: center;
}
/*登录页面CSS样式 */
#login_header{
height: 82px;
width: 1200px;
}
.login_banner{
height:475px;
background-color: #39987c;
}
.login_form{
height:310px;
width:406px;
float: right;
margin-right:50px;
margin-top: 50px;
background-color: #fff;
}
#content {
height: 475px;
width: 1200px;
}
.login_box{
margin: 20px;
height: 260px;
width: 366px;
}
h1 {
font-size: 20px;
}
.msg_cont{
background: none repeat scroll 0 0 #fff6d2;
border: 1px solid #ffe57d;
color: #666;
height: 18px;
line-height: 18px;
padding: 3px 10px 3px 40px;
position: relative;
border: none;
}
.msg_cont b {
background: url("../img/pwd-icons-new.png") no-repeat scroll -104px -22px rgba(0, 0, 0, 0);
display: block;
height: 17px;
left: 10px;
margin-top: -8px;
overflow: hidden;
position: absolute;
top: 50%;
width: 16px;
}
.form .itxt {
border: 0 none;
float: none;
font-family: "宋体";
font-size: 14px;
height: 18px;
line-height: 18px;
overflow: hidden;
padding: 10px 0 10px 10px;
width: 220px;
border: 1px #e3e3e3 solid;
}
#sub_btn{
background-color: #39987c;
border: none;
color: #fff;
width: 360px;
height: 40px;
}
#l_content {
float: left;
margin-top: 150px;
margin-left: 300px;
}
#l_content span {
font-size: 60px;
color: white;
}
.tit h1 {
float: left;
margin-top: 5px;
}
.tit a {
float: right;
margin-left: 10px;
margin-top: 10px;
color: red;
text-decoration: none;
}
.tit .errorMsg {
float: right;
margin-left: 10px;
margin-top: 10px;
color: red;
}
.tit {
height: 30px;
}
/*购物车*/
#main table{
margin: auto;
margin-top: 80px;
border-collapse: collapse;
}
#main table td{
width: 120px;
text-align:center;
border-bottom: 1px #e3e3e3 solid;
padding: 10px;
}
.cart_info{
width: 700px;
text-align: right;
}
.cart_span {
margin-left: 20px;
}
.cart_span span{
color: red;
font-size: 20px;
margin: 10px;
}
.cart_span a , td a{
font-size: 20px;
color: blue;
}
#header div span {
margin: 10px;
}
#header div .um_span{
color: red;
font-size: 25px;
margin: 10px;
}
#header div a {
color: blue;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save