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

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