📄 food_detail.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="connDB" scope="page" class="beans.connDB"/>
<jsp:useBean id="chStr" scope="page" class="beans.chStr"/>
<jsp:include page="safe.jsp"/>
<%
if (request.getParameter("foodid")!=null){
String foodid=request.getParameter("foodid");
ResultSet rs=connDB.executeQuery("select * from tb_foodinfo where foodid='"+foodid+"'");
String foodname="";
String Type="";
//String TPI="";
//String author="";
String intro="";
String pDate="";
String cover="";
float price=0;
String commend="";
String newfood="";
if(!rs.next()){
// out.println("<script lanuage='javascript'>alert('您的操作有误!');window.location.href='inde.jsp';</script>");
}else{
foodname=rs.getString("foodname");
Type=rs.getString("Type");
//TPI=rs.getString("publisher");
//author=rs.getString("writer");
intro=rs.getString("introduce");
price=rs.getFloat("Price");
pDate=rs.getString("pDate");
cover=rs.getString("cover");
newfood=rs.getInt("newfood")==0 ? "否":"是";
commend=rs.getInt("commend")==0 ? "否":"是";
}
%>
<html>
<head>
<title>订餐网</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../CSS/style.css" rel="stylesheet">
<script src="../JS/check.jsp"></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="../Images/bg.gif">
<tr>
<td>
<table width="777" height="609" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="top">
<jsp:include page="Top.jsp"/>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableBorder_LTR">
<tr>
<td height="30" align="center" bgcolor="#eeeeee">≡≡≡ <a href="index.jsp">餐品管理</a> ≡≡≡</td>
</tr>
</table>
<table width="100%" height="396" border="0" cellpadding="0" cellspacing="0" class="tableBorder_LBR">
<tr>
<td width="26%" height="395" valign="top"><table width="100%" border="0" cellspacing="-2" cellpadding="-2">
<tr>
<td width="55%" height="82" align="center" class="word_grey"> <img src="../Images/reg.gif" width="84" height="54"></td>
<td width="45%" align="left" class="word_grey">餐品详细信息</td>
</tr>
<tr>
<td height="112" colspan="2" valign="top" class="word_grey"><ul>
<li>日期:请输入该日期,如2005年10月。</li>
<li>餐品图片:请先将食品的封面文件保存到站点的manage\cover文件夹下,再输入文件名即可,包括扩展名,如:020.jpg。</li>
<li>是否推荐:选择“是”该食品信息将显示在网站的首页中。</li>
<li>是否新品:选择“是”该食品信息将显示在“新品推出”中。</li>
</ul></td>
</tr>
<tr align="center">
<td colspan="2" valign="middle" class="word_grey"></td>
</tr>
</table></td>
<td width="5" valign="top" background="../Images/Cen_separate.gif"></td>
<td width="73%" valign="top"><table width="100%" height="56" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center">
<form action="food_modify_deal.jsp" method="post" name="form1">
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF">
<tr>
<td width="14%" height="27"> 菜 号:</td>
<td height="27"> <%=foodid%></td>
<td height="27"> 菜 名:</td>
<td height="27"> <%=foodname%> </td>
</tr>
<tr>
<td width="15%" height="27"> 餐厅:</td>
<td width="46%" height="27"> <%=Type%> </td>
<td height="27"> 推出日期:</td>
<td height="27"> <%=pDate%> </tr>
<tr>
<td height="41"> 餐品图片:</td>
<td rowspan="3" align="left"> <img src="../manage/cover/<%=cover%>" width="110" height="120"> </td>
<td height="41"> 价 格:</td>
<td height="41" > <%=price%>
(元)</td>
</tr>
<tr>
<td height="45"> <%=cover%></td>
<td> 是否推荐:</td>
<td> <%=commend%></td>
</tr>
<tr>
<td height="45"> </td>
<td> 是否新品:</td>
<td> <%=newfood%></td>
</tr>
<tr>
<td height="103"> 简介:</td>
<td colspan="3"><%=intro%></td>
</tr>
<tr>
<td height="38" colspan="4" align="center">
<input name="Submit3" type="button" class="btn_grey" value="返回" onClick="JScript:history.back()"> </td>
</tr>
</table>
</form>
</td>
</tr>
</table></td>
</tr>
</table>
<jsp:include page="copyright.jsp"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
}else{
out.println("<script lanuage='javascript'>alert('您的操作有误!');window.location.href='inde.jsp';</script>");
}%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -