manager.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.util.*"%>
  6. <%@ page import="com.redmoon.forum.plugin.debate.*"%>
  7. <%@ page import="com.redmoon.forum.plugin.*"%>
  8. <%@ page import="com.redmoon.forum.Leaf"%>
  9. <%@ page import="com.redmoon.forum.LeafChildrenCacheMgr"%>
  10. <%@ page import="org.jdom.*"%>
  11. <%@ taglib uri="/WEB-INF/tlds/LabelTag.tld" prefix="lt" %>
  12. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  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 code = DebateUnit.code;
  28. PluginMgr pm = new PluginMgr();
  29. PluginUnit pu = pm.getPluginUnit(code);
  30. String op = ParamUtil.get(request, "op");
  31. if (op.equals("addBoard")) {
  32. BoardDb sb = new BoardDb();
  33. String boardCode = ParamUtil.get(request, "boardCode");
  34. DebateSkin sv = new DebateSkin();
  35. if (!boardCode.equals("")) {
  36. if (sb.create(code, boardCode, ""))
  37. out.print(StrUtil.Alert(sv.LoadString(request, "addBoardSucceed")));
  38. else
  39. out.print(StrUtil.Alert(sv.LoadString(request, "addBoardFail")));
  40. }
  41. }
  42. if (op.equals("del")) {
  43. BoardDb sb = new BoardDb();
  44. String boardCode = ParamUtil.get(request, "boardCode");
  45. sb = sb.getBoardDb(code, boardCode);
  46. DebateSkin sv = new DebateSkin();
  47. if (!boardCode.equals("")) {
  48. if (sb.del())
  49. out.print(StrUtil.Alert(sv.LoadString(request, "delBoardSucceed")));
  50. else
  51. out.print(StrUtil.Alert(sv.LoadString(request, "delBoardFail")));
  52. }
  53. }
  54. %>
  55. <table width='100%' cellpadding='0' cellspacing='0' >
  56.   <tr>
  57.     <td class="head">管理插件-<%=DebateSkin.LoadString(request, "name")%></td>
  58.   </tr>
  59. </table>
  60. <br>
  61. <table width="98%" border='0' align="center" cellpadding='0' cellspacing='0' class="frame_gray">
  62.   <tr> 
  63.     <td height=20 align="left" class="thead">管理 - <%=DebateSkin.LoadString(request, "name")%></td>
  64.   </tr>
  65.   <tr>
  66.     <td valign="top"><br>
  67.       <table width="86%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999" class="tableframe_gray">
  68.       <tr align="center">
  69.         <td width="19%" height="24" bgcolor="#EFEBDE">版面编码</td>
  70.       <td width="35%" height="22" bgcolor="#EFEBDE">版面名称</td>
  71.         <td width="46%" height="22" bgcolor="#EFEBDE">操作</td>
  72.       </tr>
  73. <%
  74. BoardDb sb1 = new BoardDb();
  75. Vector v = sb1.list("select pluginCode, boardCode from " + sb1.getTableName() + " where pluginCode=" + StrUtil.sqlstr(code));
  76. Iterator ir = v.iterator();
  77. Leaf leaf = null;
  78. com.redmoon.forum.Directory dir = new com.redmoon.forum.Directory();
  79. while (ir.hasNext()) {
  80. BoardDb sb = (BoardDb)ir.next();
  81. leaf = dir.getLeaf(sb.getBoardCode());
  82. %>
  83.       <tr align="center">
  84.         <td height="22" bgcolor="#FFFBFF"><%=leaf==null?"该版块已不存在":leaf.getCode()%></td>
  85.       <td height="22" bgcolor="#FFFBFF"><%=leaf==null?"":leaf.getName()%></td>
  86.         <td height="22" bgcolor="#FFFBFF"><a href="boardProp.jsp?code=<%=StrUtil.UrlEncode(code)%>&boardCode=<%=StrUtil.UrlEncode(leaf==null?"":leaf.getCode())%>">管理</a>&nbsp;&nbsp;&nbsp;<a href="manager.jsp?op=del&boardCode=<%=StrUtil.UrlEncode(sb.getBoardCode())%>">删除</a></td>
  87.       </tr>
  88. <%}%>
  89.     </table>
  90.       <br>
  91.       <table width="86%"  border="0" align="center" cellpadding="0" cellspacing="0">
  92.   <form action="?op=addBoard" method=post>
  93.         <tr>
  94.           <td width="56%" align="right">
  95.   <select name="boardCode" onChange="if(this.options[this.selectedIndex].value=='not'){alert('您选择的是区域,请选择版块!'); this.selectedIndex=0;}">
  96.             <option value="" selected>请选择版块</option>
  97. <%
  98. leaf = dir.getLeaf(Leaf.CODE_ROOT);
  99. com.redmoon.forum.DirectoryView dv = new com.redmoon.forum.DirectoryView(leaf);
  100. dv.ShowDirectoryAsOptions(out, leaf, leaf.getLayer());
  101. %>
  102.           </select>
  103.           &nbsp;&nbsp;&nbsp;&nbsp;</td>
  104.         <td width="44%" align="left"><input type=submit value="设为支持<%=DebateSkin.LoadString(request, "name")%>功能"></td>
  105.         </tr></form>
  106.       </table>      <br>
  107.       <br></td>
  108.   </tr>
  109. </table>
  110. </td> </tr>             
  111.       </table>                                        
  112.        </td>                                        
  113.      </tr>                                        
  114.  </table>                                        
  115.                                
  116. </body>                                        
  117. </html>                            
  118.