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

📄 dealwithcenter.jsp

📁 基于jsp+javabean+mysql三层结构的动态购物网站。网站用户接口(即界面)由jsp完成
💻 JSP
字号:
<%@ include file = "../../config.jsp" %>
<%@ page import="java.util.*"%>
<%@ page contentType="text/html;charset=GBK"%>
<jsp:useBean id="ManagerProduct" scope="page" class="myshop.product_sys.ManagerProduct"/>
<jsp:useBean id="ManagerCatalog" scope="page" class="myshop.catalog_sys.ManagerCatalog"/>
<jsp:useBean id="Handle" scope="page" class="myshop.Handle"/>
<%
//--- 判断处理行为 ---
if (Handle.getString(request,"action").equals("modify")) {
	ManagerProduct.Modify(request,tb_shop_product_info);
	response.sendRedirect(request.getHeader("referer"));
}
else if (Handle.getString(request,"action").equals("del")) {
	ManagerProduct.Del(request,tb_shop_product_info,tb_gbook_info);
	response.sendRedirect(request.getHeader("referer"));
}
else if (Handle.getString(request,"action").equals("show_out")) {
	ManagerProduct.ShowOut(request,tb_shop_product_info);
	response.sendRedirect(request.getHeader("referer"));
}
else if (Handle.getString(request,"action").equals("unshow_out")) {
	ManagerProduct.UnShowOut(request,tb_shop_product_info);
	response.sendRedirect(request.getHeader("referer"));
}
else if (Handle.getString(request,"action").equals("mark_absence")) {
	ManagerProduct.MarkAbsence(request,tb_shop_product_info);
	response.sendRedirect(request.getHeader("referer"));
}
else if (Handle.getString(request,"action").equals("unmark_absence")) {
	ManagerProduct.UnMarkAbsence(request,tb_shop_product_info);
	response.sendRedirect(request.getHeader("referer"));
}
else if (Handle.getString(request,"action").equals("moveproducts")) {
	ManagerProduct.MoveProducts(tb_shop_product_info,request);
	response.sendRedirect(request.getHeader("referer"));
}
else if (Handle.getString(request,"action").equals("importanceshow")) {
	ManagerProduct.importanceShow(request,tb_shop_product_info);
	response.sendRedirect(request.getHeader("referer"));
}
else if (Handle.getString(request,"action").equals("unimportanceshow")) {
	ManagerProduct.unImportanceShow(request,tb_shop_product_info);
	response.sendRedirect(request.getHeader("referer"));
}
//--- 读取商品信息 ---
Hashtable ProductInfo = new Hashtable();
int Pid = Handle.getInt(request,"Pid");
ProductInfo = ManagerProduct.DetailProInfo(tb_shop_catalog,tb_shop_product_info,Pid);
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../style" rel="stylesheet" type="text/css">
</head>

<body>
<form name="form1" method="post" action="">
<input type="hidden" name="action" value="modify">
<input type="hidden" name="Pid" value="<%=Pid%>">
  <table width="100%" border="0" cellspacing="0" cellpadding="3">
    <tr>
      <td>商品操作 -&gt; 管理商品 -&gt; 修改商品</td>
    </tr>
  </table>
  <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#999999">
    <tr bgcolor="f1f1f1"> 
      <td width="21%">名称:</td>
      <td width="79%"><input name="name" type="text" value="<%=ProductInfo.get("name")%>"></td>
    </tr>
    <tr bgcolor="f1f1f1"> 
      <td>简介:</td>
      <td><textarea name="description" cols="40" rows="7"><%=ProductInfo.get("description_txt")%></textarea></td>
    </tr>
    <tr bgcolor="f1f1f1"> 
      <td>关键字:</td>
      <td><input name="keywords" type="text" value="<%=ProductInfo.get("keywords")%>"></td>
    </tr>
    <tr bgcolor="f1f1f1"> 
      <td>货架:</td>
      <td><select name="catalog_id">
          <%
int catalog_id = Integer.parseInt(ProductInfo.get("catalog_id") + "");
out.print(ManagerCatalog.ListCatalog(tb_shop_catalog,catalog_id));
%>
        </select></td>
    </tr>
    <tr bgcolor="f1f1f1"> 
      <td>价钱:</td>
      <td><input name="price" type="text" value="<%=ProductInfo.get("price")%>"></td>
    </tr>
    <tr align="center" valign="middle" bgcolor="f1f1f1"> 
      <td colspan="2"><input type="submit" name="Submit" value="修改"> <input name="button" type="button" onclick="history.back()" value="返回"></td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -