📄 order_6_3.jsp
字号:
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page import="com.hzs.order.*" %>
<jsp:useBean id="DB" scope="page" class="com.hzs.order.DBHandle" />
<%
if (session.getAttribute("grade")==null || !(session.getAttribute("grade").toString().equals("6")))
{
%>
<jsp:forward page="con_error.jsp">
<jsp:param name="error_nm" value="非 法 操 作" />
<jsp:param name="error_all" value="非法操作,您并不是超级管理员!" />
</jsp:forward>
<%
}
String id=DBHandle.toChinese(request.getParameter("id"));
if (id==null)
{
%>
<jsp:forward page="con_error.jsp">
<jsp:param name="error_nm" value="非 法 操 作" />
<jsp:param name="error_all" value="ID号不存在!" />
</jsp:forward>
<%
}
%>
<html>
<head>
<title>修改菜单</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/global.css" type="text/css">
<style type="text/css">
<!--
td { text-align: center}
-->
</style>
<script language="javascript" src="js/global.js"></script>
<script language="JavaScript">
<!--
function go_page()
{
window.location.replace('order_6_1.jsp');
}
function confirm_all()
{
GxTrimStr(document.fo_main.tx_food);
if (GxIsEmpty(document.fo_main.tx_food))
{
document.fo_main.tx_food.select();
alert("请输入菜单名!");
return false;
}
GxTrimStr(document.fo_main.tx_price);
if (GxIsEmpty(document.fo_main.tx_price))
{
document.fo_main.tx_price.select();
alert("请输入单价!");
return false;
}
if (!GxNumberCheck(document.fo_main.tx_price,""))
{
document.fo_main.tx_price.select();
alert("您输入的不是数字吧!?");
return false;
}
if (parseFloat(document.fo_main.tx_price.value)==0)
{
document.fo_main.tx_price.select();
alert("这种菜不会不要钱吧!?");
return false;
}
GxTrimStr(document.fo_main.tx_tel);
if (GxIsEmpty(document.fo_main.tx_tel))
{
document.fo_main.tx_tel.select();
alert("请输入订购电话!");
return false;
}
return true;
}
-->
</script>
<body background="images/menu.gif">
<h2>---修 改 菜 单--- </h2>
<%
Vector Result=new Vector();
Vector Result_cp=new Vector();
try{
DB.connect();
Result=DB.select("SELECT food_nm,food_price,food_tel FROM all_food WHERE food_id="+id);
Result_cp=DB.select("select cp_nm from all_cp where cp_id='"+Result.elementAt(2).toString()+"'");
DB.close();
}
catch(DBException e)
{
%>
<jsp:forward page="con_error.jsp">
<jsp:param name="error_nm" value="数 据 库 错 误" />
<jsp:param name="error_all" value="<%=e.getMessage()%>"/>
</jsp:forward>
<%
}
finally{
DB.close();
}
%>
<center>
<p> </p>
<form name="fo_main" method="post" action="order_6_4.jsp" onsubmit="return confirm_all();">
<table width="338">
<tr>
<th>菜 名:</th>
<td>
<div align="left">
<input type="text" name="tx_food" size="20" maxlength="20" value=<%=Result.elementAt(0)%> >
<input type="hidden" name="hid_id" value=<%=id%>>
</div>
</td>
</tr>
<tr>
<th>单 价:</th>
<td>
<div align="left">
<input type="text" name="tx_price" size="10" maxlength="6" value=<%=Result.elementAt(1)%>>
</div>
</td>
</tr>
<tr>
<th>预定公司:</th>
<td>
<div align="left">
<input type="text" name="tx_tel" readonly style="border-style:double;width=100;background-color:#DCDCDC" value=<%=Result_cp.elementAt(0)%>>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="submit" name="sb_1" value="修 改">
<input type="button" name="bt_1" value="返 回" onclick="go_page();">
</div>
</td>
</tr>
</table>
</form>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -