CategoryAdd.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. String action = request.getParameter("action");
  6. if(action != null && action.trim().equals("add")) {
  7. String name = request.getParameter("name");
  8. String descr = request.getParameter("descr");
  9. Category c = new Category();
  10. c.setPid(0);
  11. c.setName(name);
  12. c.setDescr(descr);
  13. c.setGrade(1);
  14. CategoryService service = CategoryService.getInstance();
  15. service.add(c);
  16. out.println("类别添加成功!恭喜!");
  17. return;
  18. }
  19. %>
  20. <html><head><title>金尚商城添加根类别</title>
  21. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  22. <meta name="keywords" content="Discuz!,Board,Comsenz,forums,bulletin board,">
  23. <meta name="description" content="醒客论坛专区  - Discuz! Board">
  24. <meta name="generator" content="Discuz! 4.0.0RC4 with Templates 4.0.0">
  25. <meta name="MSSmartTagsPreventParsing" content="TRUE">
  26. <meta http-equiv="MSThemeCompatible" content="Yes">
  27. <style type="text/css"><!--
  28. a { text-decoration: none; color: #000000 }
  29. a:hover { text-decoration: underline }
  30. body { scrollbar-base-color: #F3F6FA; scrollbar-arrow-color: #4D76B3; font-size: 12px; background-color: #ffffff }
  31. table { font: 12px Verdana,Tahoma; color: #000000 }
  32. input,select,textarea { font: 11px Verdana,Tahoma; color: #000000; font-weight: normal; background-color: #F3F6FA }
  33. select { font: 11px Verdana,Tahoma; color: #000000; font-weight: normal; background-color: #F3F6FA }
  34. .nav { font: 12px Verdana,Tahoma; color: #000000; font-weight: bold }
  35. .nav a { color: #000000 }
  36. .header { font: 11px Verdana,Tahoma; color: #FFFFFF; font-weight: bold; background-image: url("images/green/bg01.gif") }
  37. .header a { color: #FFFFFF }
  38. .category { font: 11px Verdana,Tahoma; color: #000000; background-color: #EFEFEF }
  39. .tableborder { background: #4D76B3; border: 0px solid #4D76B3 } 
  40. .singleborder { font-size: 0px; line-height: 0px; padding: 0px; background-color: #F3F6FA }
  41. .smalltxt { font: 11px Verdana,Tahoma }
  42. .outertxt { font: 12px Verdana,Tahoma; color: #000000 }
  43. .outertxt a { color: #000000 }
  44. .bold { font-weight: bold }
  45. .altbg1 { background: #F3F6FA }
  46. .altbg2 { background: #FFFFFF }
  47. --></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><br><table style="table-layout: fixed;" align="center" border="0" cellpadding="0" cellspacing="0" width="97%"> 
  48. <tbody><tr><td class="nav" align="left" nowrap="nowrap" width="90%">&nbsp;金尚商城 &raquo; <br></td>
  49. <td align="right" width="10%">&nbsp;<a href="#bottom"><img src="images/arrow_dw.gif" align="absmiddle" border="0"></a></td>        
  50. </tr></tbody></table><br>
  51. <form method="post" name="register" action="CategoryAdd.jsp" onSubmit="this.regsubmit.disabled=true;">
  52. <input type="hidden" name="action" value="add"/>
  53. <table class="tableborder" align="center" cellpadding="4" cellspacing="1" width="97%">
  54. <tbody><tr>
  55. <td colspan="2" class="header">添加类别 - 必填内容</td>
  56. </tr>
  57. <tr>
  58. <td class="altbg1" width="21%">类别名称:</td>
  59. <td class="altbg2"><input name="name" size="25" maxlength="25" type="text"> 
  60. </tr>
  61. <tr>
  62. <td class="altbg1" valign="top">类别描述:</td>
  63. <td class="altbg2"><textarea name="descr" cols="60" rows="5" id="descr"></textarea></td>
  64. </tr>
  65. </tbody></table>
  66. <br>
  67. <center><input name="regsubmit" value="提 &nbsp; 交" type="submit"></center>
  68. </form>
  69. </body></html>