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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8" %>
  2. <%@ include file="../../../inc/inc.jsp" %>
  3. <%@ page import="java.util.*"%>
  4. <%@ page import="cn.js.fan.web.SkinUtil"%>
  5. <%@ page import="cn.js.fan.web.Global"%>
  6. <%@ page import="cn.js.fan.db.Conn"%>
  7. <%@ page import="cn.js.fan.util.*"%>
  8. <%@ page import="com.redmoon.forum.plugin.auction.*"%>
  9. <%@ page import="com.redmoon.forum.plugin.*"%>
  10. <%@ page import="com.redmoon.forum.*"%>
  11. <%@ page import="com.redmoon.forum.Leaf"%>
  12. <jsp:useBean id="StrUtil" scope="page" class="cn.js.fan.util.StrUtil"/>
  13. <html><head>
  14. <meta http-equiv="pragma" content="no-cache">
  15. <link rel="stylesheet" href="../../../common.css">
  16. <LINK href="../../../admin/default.css" type=text/css rel=stylesheet>
  17. <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
  18. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  19. <title>插件管理</title>
  20. <script language="JavaScript">
  21. <!--
  22. function form1_onsubmit() {
  23. form1.auctionRule.value = getHtml();
  24. if (form1.auctionRule.value.length>3000) {
  25. alert("您输入的数据太长,不允许超过3000字!");
  26. return false;
  27. }
  28. }
  29. //-->
  30. </script>
  31. <body bgcolor="#FFFFFF" topmargin='0' leftmargin='0'>
  32. <jsp:useBean id="privilege" scope="page" class="cn.js.fan.module.pvg.Privilege"/>
  33. <%
  34. if (!privilege.isUserPrivValid(request, "forum.plugin"))
  35. {
  36. out.print(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  37. return;
  38. }
  39. String boardCode = ParamUtil.get(request, "boardCode");
  40. if (boardCode.equals("")) {
  41. out.print(SkinUtil.LoadString(request, "want") + "boardCode");
  42. return;
  43. }
  44. AuctionBoardDb sb = new AuctionBoardDb();
  45. sb = (AuctionBoardDb)sb.getObjectDb(boardCode);
  46. Leaf leaf = new Leaf();
  47. leaf = leaf.getLeaf(boardCode);
  48. String op = ParamUtil.get(request, "op");
  49. if (op.equals("modify")) {
  50. AuctionSkin sv = new AuctionSkin();
  51. String auctionRule = ParamUtil.get(request, "auctionRule");
  52. sb.setAuctionRule(auctionRule);
  53. if (sb.save())
  54. out.print(StrUtil.Alert(sv.LoadString(request, "modifySucceed")));
  55. else
  56. out.print(StrUtil.Alert(sv.LoadString(request, "modifyFail")));
  57. }
  58. %>
  59. <table width='100%' cellpadding='0' cellspacing='0' >
  60.   <tr>
  61.     <td class="head">管理插件-<a href=manager.jsp><%=AuctionSkin.LoadString(request, "name")%></a>的规则</td>
  62.   </tr>
  63. </table>
  64. <br>
  65. <table width="98%" height="227" border='0' align="center" cellpadding='0' cellspacing='0' class="frame_gray">
  66.   <tr> 
  67.     <td height=20 align="left" class="thead">&nbsp;</td>
  68.   </tr>
  69.   <tr> 
  70.     <td valign="top"><br>
  71.       <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFBFF" class="tableframe_gray">
  72.   <form name=form1 action="?op=modify" method="post" onSubmit="return form1_onsubmit()">
  73.       <tr align="center">
  74.         <td width="25%" height="22">版面编码</td>
  75.       <td width="75%" height="22" align="left"><%=leaf.getCode()%><input type="hidden" name="boardCode" value="<%=boardCode%>"></td>
  76.         </tr>
  77.       <tr align="center">
  78.         <td height="22">版面名称</td>
  79.       <td height="22" align="left"><%=leaf.getName()%></td>
  80.         </tr>
  81.       <tr align="center">
  82.         <td height="22">版面规则</td>
  83.         <td height="22" align="left">
  84. <%
  85. String rpath = request.getContextPath();
  86. %>
  87. <textarea id="auctionRule" name="auctionRule" style="display:none"><%=sb.getAuctionRule().replaceAll(""","'")%></textarea>
  88. <link rel="stylesheet" href="<%=rpath%>/editor/edit.css">
  89. <script src="<%=rpath%>/editor/DhtmlEdit.js"></script>
  90. <script src="<%=rpath%>/editor/editjs.jsp"></script>
  91. <script src="<%=rpath%>/editor/editor_s.jsp"></script>
  92. <script>
  93. setHtml(form1.auctionRule);
  94. </script>
  95.         
  96. </tr>
  97.       <tr align="center">
  98.         <td height="30" colspan="2"><input type="submit" name="Submit" value="提交">
  99. &nbsp;&nbsp;
  100.           <input type="reset" name="Submit" value="重置"></td>
  101.         </tr></form>
  102.     </table>
  103.       <br>
  104.     </td>
  105.   </tr>
  106. </table>
  107. </td> </tr>             
  108.       </table>                                        
  109.        </td>                                        
  110.      </tr>                                        
  111.  </table>                                                               
  112. </body>                                        
  113. </html>                            
  114.