applyshop_do.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:3k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8"%>
  2. <%@ page import="java.util.*"%>
  3. <%@ page import="cn.js.fan.util.*"%>
  4. <%@ page import="cn.js.fan.db.*"%>
  5. <%@ page import="cn.js.fan.web.*"%>
  6. <%@ page import="com.redmoon.forum.plugin.auction.*"%>
  7. <%@ page import="com.redmoon.forum.plugin.*"%>
  8. <%@ page import="com.redmoon.forum.person.*"%>
  9. <%
  10. String skincode = UserSet.getSkin(request);
  11. if (skincode.equals(""))
  12. skincode = UserSet.defaultSkin;
  13. SkinMgr skm = new SkinMgr();
  14. Skin skin = skm.getSkin(skincode);
  15. if (skin==null)
  16. skin = skm.getSkin(UserSet.defaultSkin);
  17. String skinPath = skin.getPath();
  18. %>
  19. <html>
  20. <head>
  21. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  22. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  23. <meta name="ProgId" content="FrontPage.Editor.Document">
  24. <link href="../../<%=skinPath%>/skin.css" rel="stylesheet" type="text/css">
  25. <title><%=Global.AppName%> - 我要开店</title>
  26. <style type="text/css">
  27. <!--
  28. body {
  29. margin-top: 0px;
  30. margin-left: 0px;
  31. margin-right: 0px;
  32. }
  33. .style1 {
  34. font-size: 10pt;
  35. font-weight: bold;
  36. }
  37. -->
  38. </style></head>
  39. <body>
  40. <%@ include file="../../inc/header.jsp"%>
  41. <jsp:useBean id="StrUtil" scope="page" class="cn.js.fan.util.StrUtil"/>
  42. <jsp:useBean id="privilege" scope="page" class="com.redmoon.forum.Privilege"/>
  43. <%
  44. if (!privilege.isUserLogin(request)) {
  45. out.print(StrUtil.makeErrMsg("请先登录!"));
  46. return;
  47. }
  48. String shopName = "";
  49. String desc = "";
  50. String tel = "";
  51. String address = "";
  52. String contacter = "";
  53. try {
  54. shopName = ParamUtil.get(request, "shopName");
  55. if (shopName.equals(""))
  56. throw new ErrMsgException("店名不能为空!");
  57. desc = ParamUtil.get(request, "desc");
  58. if (desc.equals(""))
  59. throw new ErrMsgException("简介不能为空!");
  60. tel = ParamUtil.get(request, "tel");
  61. if (tel.equals(""))
  62. throw new ErrMsgException("电话不能为空!");
  63. address = ParamUtil.get(request, "address");
  64. if (address.equals(""))
  65. throw new ErrMsgException("地址不能为空!");
  66. contacter = ParamUtil.get(request, "contacter");
  67. }
  68. catch (ErrMsgException e) {
  69. out.print(StrUtil.Alert(e.getMessage()));
  70. return;
  71. }
  72. boolean re = false;
  73. AuctionShopDb as = new AuctionShopDb();
  74. try {
  75. as = as.getAuctionShopDb(privilege.getUser(request));
  76. if (as.isLoaded()) {
  77. out.print(StrUtil.Alert_Back("您的店铺已存在,不能申请!"));
  78. }
  79. else {
  80. as.setShopName(shopName);
  81. as.setAddress(address);
  82. as.setTel(tel);
  83. as.setDesc(desc);
  84. as.setUserName(privilege.getUser(request));
  85. as.setContacter(contacter);
  86. re = as.create();
  87. }
  88. }
  89. catch (ResKeyException e) {
  90. out.print(StrUtil.Alert_Back(e.getMessage(request)));
  91. return;
  92. }
  93. if (re) {%>
  94. <table width="98%"  border="0" align="center" cellpadding="5">
  95.   <tr>
  96.     <td height="36">“<%=Global.AppName%>”祝贺您建店成功!请注意交易的诚信和安全!您的每笔订单都将会保存在社区的数据库中,请收藏管理店铺的地址。<br>
  97.     <br>      
  98.     &gt;&gt; <a href="shop.jsp?id=<%=as.getId()%>">查看我的店铺</a><br>
  99.     <br>
  100.     &gt;&gt;&nbsp;<a href="manager/index.jsp?userName=<%=StrUtil.UrlEncode(privilege.getUser(request))%>">管理我的店铺</a></td>
  101.   </tr>
  102. </table>
  103. <%}%>
  104. </body>
  105. </html>