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