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.debate.*"%>
  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. <body bgcolor="#FFFFFF" topmargin='0' leftmargin='0'>
  21. <jsp:useBean id="privilege" scope="page" class="com.redmoon.forum.Privilege"/>
  22. <%
  23. if (!privilege.isMasterLogin(request)) {
  24. out.print(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  25. return;
  26. }
  27. String boardCode = ParamUtil.get(request, "boardCode");
  28. if (boardCode.equals("")) {
  29. out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request, "want") + "boardCode"));
  30. return;
  31. }
  32. String code = ParamUtil.get(request, "code");
  33. BoardDb sb = new BoardDb();
  34. sb = sb.getBoardDb(code, boardCode);
  35. Leaf leaf = new Leaf();
  36. leaf = leaf.getLeaf(boardCode);
  37. PluginMgr pm = new PluginMgr();
  38. PluginUnit pu = pm.getPluginUnit(code);
  39. String op = ParamUtil.get(request, "op");
  40. if (op.equals("modify")) {
  41. String boardRule = ParamUtil.get(request, "boardRule");
  42. sb.setBoardRule(boardRule);
  43. if (sb.save())
  44. out.print(StrUtil.Alert("修改成功!"));
  45. else
  46. out.print(StrUtil.Alert("修改失败!"));
  47. }
  48. %>
  49. <table width='100%' cellpadding='0' cellspacing='0' >
  50.   <tr>
  51.     <td class="head">管理插件-<a href=manager.jsp><%=StrUtil.LoadString(request, "name")%></a>的规则</td>
  52.   </tr>
  53. </table>
  54. <br>
  55. <table width="98%" height="227" border='0' align="center" cellpadding='0' cellspacing='0' class="frame_gray">
  56.   <tr> 
  57.     <td height=20 align="left" class="thead">&nbsp;</td>
  58.   </tr>
  59.   <tr> 
  60.     <td valign="top"><br>
  61.       <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFBFF" class="tableframe_gray">
  62.   <form action="?op=modify" method="post">
  63.       <tr align="center">
  64.         <td width="25%" height="22">版面编码</td>
  65.       <td width="75%" height="22" align="left"><%=leaf.getCode()%>
  66.   <input type="hidden" name="boardCode" value="<%=boardCode%>">
  67.   <input type="hidden" name="code" value="<%=code%>">
  68.   </td>
  69.         </tr>
  70.       <tr align="center">
  71.         <td height="22">版面名称</td>
  72.       <td height="22" align="left"><%=leaf.getName()%></td>
  73.         </tr>
  74.       <tr align="center">
  75.         <td height="22">版面规则</td>
  76.         <td height="22" align="left"><textarea name="boardRule" cols="78" rows="20"><%=sb.getBoardRule()%></textarea></td>
  77.         </tr>
  78.       <tr align="center">
  79.         <td height="22" colspan="2"><input type="submit" name="Submit" value="提交">
  80. &nbsp;&nbsp;
  81.           <input type="reset" name="Submit" value="重置"></td>
  82.         </tr></form>
  83.     </table>
  84.       <br>
  85.     </td>
  86.   </tr>
  87. </table>
  88. </td> </tr>             
  89.       </table>                                        
  90.        </td>                                        
  91.      </tr>                                        
  92.  </table>                                        
  93.                                
  94. </body>                                        
  95. </html>