CategoryModify.jsp
上传用户:sxychgz
上传日期:2019-04-21
资源大小:4772k
文件大小:4k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page language="java" import="com.bjsxt.shopping.category.*" pageEncoding="GBK"%>
  2. <%@ page import="java.util.*"%>
  3. <%
  4. request.setCharacterEncoding("GBK");
  5. int id = Integer.parseInt(request.getParameter("id"));
  6. Category c = CategoryService.getInstance().loadById(id);
  7. String action = request.getParameter("action");
  8. if(action != null && action.trim().equals("modify")) {
  9. String name = request.getParameter("name");
  10. String descr = request.getParameter("descr");
  11. c.setName(name);
  12. c.setDescr(descr);
  13. // CategoryService service = CategoryService.getInstance();
  14. // service.update(c);
  15. c.update();
  16. out.println("类别修改成功!恭喜!");
  17. %>
  18. <script language="javascript">
  19. parent.main.location.reload();
  20. </script>
  21. <%
  22. return;
  23. }
  24. %>
  25. <html><head><title>金尚商城添加根类别</title>
  26. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  27. <meta name="keywords" content="Discuz!,Board,Comsenz,forums,bulletin board,">
  28. <meta name="description" content="醒客论坛专区  - Discuz! Board">
  29. <meta name="generator" content="Discuz! 4.0.0RC4 with Templates 4.0.0">
  30. <meta name="MSSmartTagsPreventParsing" content="TRUE">
  31. <meta http-equiv="MSThemeCompatible" content="Yes">
  32. <style type="text/css"><!--
  33. a { text-decoration: none; color: #000000 }
  34. a:hover { text-decoration: underline }
  35. body { scrollbar-base-color: #F3F6FA; scrollbar-arrow-color: #4D76B3; font-size: 12px; background-color: #ffffff }
  36. table { font: 12px Verdana,Tahoma; color: #000000 }
  37. input,select,textarea { font: 11px Verdana,Tahoma; color: #000000; font-weight: normal; background-color: #F3F6FA }
  38. select { font: 11px Verdana,Tahoma; color: #000000; font-weight: normal; background-color: #F3F6FA }
  39. .nav { font: 12px Verdana,Tahoma; color: #000000; font-weight: bold }
  40. .nav a { color: #000000 }
  41. .header { font: 11px Verdana,Tahoma; color: #FFFFFF; font-weight: bold; background-image: url("images/green/bg01.gif") }
  42. .header a { color: #FFFFFF }
  43. .category { font: 11px Verdana,Tahoma; color: #000000; background-color: #EFEFEF }
  44. .tableborder { background: #4D76B3; border: 0px solid #4D76B3 } 
  45. .singleborder { font-size: 0px; line-height: 0px; padding: 0px; background-color: #F3F6FA }
  46. .smalltxt { font: 11px Verdana,Tahoma }
  47. .outertxt { font: 12px Verdana,Tahoma; color: #000000 }
  48. .outertxt a { color: #000000 }
  49. .bold { font-weight: bold }
  50. .altbg1 { background: #F3F6FA }
  51. .altbg2 { background: #FFFFFF }
  52. --></style><script language="JavaScript" src="images/common.js"></script><style type="text/css" id="defaultPopStyle">.cPopText { font-family: Tahoma, Verdana; background-color: #FFFFCC; border: 1px #000000 solid; font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; visibility: hidden; filter: Alpha(Opacity=80)}</style></head><body leftmargin="0" rightmargin="0" topmargin="0" onkeydown="if(event.keyCode==27) return false;"><div id="popLayer" style="position: absolute; z-index: 1000;" class="cPopText"></div>
  53. <table style="table-layout: fixed;" align="center" border="0" cellpadding="0" cellspacing="0" width="97%"> 
  54. <tbody><tr><td class="nav" align="left" nowrap="nowrap" width="90%">&nbsp;&#37329;&#23578;&#21830;&#22478; &#187; 注册</td>
  55. <td align="right" width="10%">&nbsp;<a href="#bottom"><img src="images/arrow_dw.gif" align="absmiddle" border="0"></a></td>        
  56. </tr></tbody></table><br>
  57. <form method="post" name="register" action="CategoryModify.jsp" onSubmit="this.regsubmit.disabled=true;">
  58. <input type="hidden" name="action" value="modify"/>
  59. <input type="hidden" name="id" value="<%=id%>"/>
  60. <table class="tableborder" align="center" cellpadding="4" cellspacing="1" width="97%">
  61. <tbody><tr>
  62. <td colspan="2" class="header">添加类别 - 必填内容</td>
  63. </tr>
  64. <tr>
  65. <td class="altbg1" width="21%">类别名称:</td>
  66. <td class="altbg2"><input name="name" size="25" maxlength="25" type="text" value="<%=c.getName()%>"> 
  67. </tr>
  68. <tr>
  69. <td class="altbg1" valign="top">类别描述:</td>
  70. <td class="altbg2"><textarea name="descr" cols="60" rows="5" id="descr"><%=c.getDescr()%></textarea></td>
  71. </tr>
  72. </tbody></table>
  73. <br>
  74. <center><input name="regsubmit" value="提 &nbsp; 交" type="submit"></center>
  75. </form>
  76. <script language="JavaScript">
  77. document.register.username.focus();
  78. </script>
  79. </body></html>