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.util.*"%>
  6. <%@ page import="com.redmoon.forum.plugin.info.*"%>
  7. <%@ page import="com.redmoon.forum.plugin.*"%>
  8. <%@ page import="com.redmoon.forum.Leaf"%>
  9. <%@ page import="com.redmoon.forum.LeafChildrenCacheMgr"%>
  10. <jsp:useBean id="StrUtil" scope="page" class="cn.js.fan.util.StrUtil"/>
  11. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  12. <html><head>
  13. <meta http-equiv="pragma" content="no-cache">
  14. <link rel="stylesheet" href="../../../common.css">
  15. <LINK href="../../../admin/default.css" type=text/css rel=stylesheet>
  16. <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
  17. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  18. <title>插件管理</title>
  19. <body bgcolor="#FFFFFF" topmargin='0' leftmargin='0'>
  20. <jsp:useBean id="privilege" scope="page" class="com.redmoon.forum.Privilege"/>
  21. <%
  22. if (!privilege.isMasterLogin(request))
  23. {
  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 = "info";
  28. PluginMgr pm = new PluginMgr();
  29. PluginUnit pu = pm.getPluginUnit(code);
  30. String op = ParamUtil.get(request, "op");
  31. if (op.equals("addBoard")) {
  32. InfoBoardDb sb = new InfoBoardDb();
  33. String boardCode = ParamUtil.get(request, "boardCode");
  34. InfoSkin sv = new InfoSkin();
  35. if (!boardCode.equals("")) {
  36. if (sb.create(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. InfoBoardDb sb = new InfoBoardDb();
  44. String boardCode = ParamUtil.get(request, "boardCode");
  45. sb = sb.getInfoBoardDb(boardCode);
  46. InfoSkin sv = new InfoSkin();
  47. if (!boardCode.equals("")) {
  48. if (sb.del())
  49. out.print(StrUtil.Alert("操作成功!"));
  50. else
  51. out.print(StrUtil.Alert("操作失败!"));
  52. }
  53. }
  54. %>
  55. <table width='100%' cellpadding='0' cellspacing='0' >
  56.   <tr>
  57.     <td class="head">管理插件-<%=InfoSkin.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">管理 - <%=InfoSkin.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. InfoBoardDb sb1 = new InfoBoardDb();
  75. Vector v = sb1.list();
  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. InfoBoardDb sb = (InfoBoardDb)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?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. }%>   
  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"><a href="config_info.jsp">管理分类</a>&nbsp;&nbsp;&nbsp;
  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="设为支持<%=InfoSkin.LoadString(request, "name")%>功能"></td>
  106.         </tr></form>
  107.       </table>
  108.       <br></td>
  109.   </tr>
  110. </table>
  111. </td> </tr>             
  112.       </table>                                        
  113.        </td>                                        
  114.      </tr>                                        
  115.  </table>                                        
  116.                                
  117. </body>                                        
  118. </html>                            
  119.