wyc_branch
wyc 8 months ago
parent eff049e940
commit 6fdbd06169

@ -0,0 +1,110 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
function buy1()
{
<c:if test="${sessionScope.userType !=1}">
alert("请先登录");
</c:if>
<c:if test="${sessionScope.userType==1}">
if(document.buy.quantity.value=="")
{
alert("请输入购买数量");
return false;
}
document.buy.submit();
</c:if>
}
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!--头部 -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 头部 -->
<div id="page">
<div id="page-bgtop">
<!-- 右侧 -->
<div id="content">
<div class="post">
<h2 class="title"><a href="#">菜品详细信息</a></h2>
<div class="entry">
<form action="<%=path %>/buy?type=addToCart" method="post" name="buy">
<table width="100%" border="0" cellpadding="9" cellspacing="9">
<tr>
<td align="left"><img width="220" height="180" src="<%=path %>/${requestScope.goods.fujian }" style="border:1px solid #ccc; padding:3px;"/></td>
</tr>
<tr>
<td align="left">商品编号:${requestScope.goods.bianhao }</td>
</tr>
<tr>
<td align="left">商品名称:${requestScope.goods.mingcheng }</td>
</tr>
<tr>
<td align="left">商品描述:<c:out value="${requestScope.goods.jieshao }" escapeXml="false"></c:out></td>
</tr>
<tr>
<td align="left">价格:${requestScope.goods.shichangjia }</td>
</tr>
<tr>
<td align="left">
数量:<input type="text" name="quantity" value="1" size="8" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"/>
<!--插入菜品的数量框onpropertychange当输入框属性变化时触发onchange1属性修改数据库菜品价格 下一句为按键之后触发将输入值为非数字的字符替换为空,粘贴之后触发将输入值为非数字的字符替换为空-->
<input type="hidden" name="goods_id" value="${requestScope.goods.id }"/>
<input type="button" value="购买" style="width: 80px;height: 30px;" onclick="buy1()">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧 -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,93 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!-- 头部 -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 头部 -->
<div id="page">
<div id="page-bgtop">
<!-- 右侧 -->
<div id="content">
<div class="post">
<h2 class="title"><a href="#">菜品信息</a></h2>
<div class="entry"> <!-- 设置菜品图片样式 -->
<TABLE class=main border=0 cellSpacing=2 cellPadding=2>
<TR>
<c:forEach items="${requestScope.goodsList}" var="goods" varStatus="sta">
<c:if test="${sta.index%4==0}"> <!-- 每行放4张图片 -->
</tr><tr>
</c:if>
<TD>
<TABLE onmouseover="this.style.backgroundColor='#FF6600'" onmouseout="this.style.backgroundColor=''" border=0 cellSpacing=1 cellPadding=2 width=98 bgColor=#e1e1e1 align=center height=100>
<TR>
<TD bgColor=#ffffff align=left>
<P align="center">
<A href="<%=path %>/goods?type=goodsDetailQian&id=${goods.id }"><IMG border=0 align=absMiddle src="<%=path %>/${goods.fujian }" width=150 height=140></A>
</>
<center><A href="<%=path %>/goods?type=goodsDetailQian&id=${goods.id }"><FONT color=#ff0000></FONT>${goods.mingcheng }</A></center>
</P>
</TD>
</TR>
</TABLE>
</TD>
</c:forEach>
</TR>
</TABLE>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧 -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,92 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!-- 头部 -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 头部 -->
<div id="page">
<div id="page-bgtop">
<!-- 右侧 -->
<div id="content">
<div class="post">
<h2 class="title"><a href="#">菜品信息</a></h2>
<div class="entry">
<TABLE class=main border=0 cellSpacing=2 cellPadding=2>
<TR>
<c:forEach items="${requestScope.goodsList}" var="goods" varStatus="sta">
<c:if test="${sta.index%4==0}">
</tr><tr>
</c:if>
<TD>
<TABLE onmouseover="this.style.backgroundColor='#FF6600'" onmouseout="this.style.backgroundColor=''" border=0 cellSpacing=1 cellPadding=2 width=98 bgColor=#e1e1e1 align=center height=100>
<TR>
<TD bgColor=#ffffff align=left>
<P align="center">
<A href="<%=path %>/goods?type=goodsDetailQian&id=${goods.id }"><IMG border=0 align=absMiddle src="<%=path %>/${goods.fujian }" width=150 height=140></A>
</>
<center><A href="<%=path %>/goods?type=goodsDetailQian&id=${goods.id }"><FONT color=#ff0000></FONT>${goods.mingcheng }</A></center>
</P>
</TD>
</TR>
</TABLE>
</TD>
</c:forEach>
</TR>
</TABLE>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧 -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,90 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!-- 头部 -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 头部 -->
<div id="page">
<div id="page-bgtop">
<!-- 右侧 -->
<div id="content">
<div class="post">
<!-- <h2 class="title"><a href="#">菜品信息</a></h2> -->
<div class="entry">
<form name="ff" method="post" action="<%=path %>/goods?type=goodsRes">
<table align="left" border="0" cellpadding="9" cellspacing="9">
<tr align='center'>
<td style="width: 60px;" align="left">
菜品名称:
</td>
<td align="left">
<input name="mingcheng" type="text" style="width: 200px;" />
</td>
</tr>
<tr align='center'>
<td style="width: 60px;" align="left"></td>
<td align="left">
<input type="submit" value="查询"/>&nbsp;
<input type="reset" value="重置"/>&nbsp;
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧 -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>
Loading…
Cancel
Save