⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 order_6_3.jsp

📁 该系统是一个B/S结构的公司定饭系统,整套软件由JSP编制,希望大家能够多提宝贵意见,但请不要将它应用于商业环境,如实在要使用的话,请与作者联系!(使用此系统无比要有ORACLE8i以上版本数据库!)
💻 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>&nbsp;</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 + -