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.reward.*"%>
  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. RewardBoardDb sb = new RewardBoardDb();
  33. String boardCode = ParamUtil.get(request, "boardCode");
  34. RewardSkin sv = new RewardSkin();
  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. RewardBoardDb sb = new RewardBoardDb();
  44. String boardCode = ParamUtil.get(request, "boardCode");
  45. sb = sb.getRewardBoardDb(boardCode);
  46. RewardSkin sv = new RewardSkin();
  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">管理插件-<%=RewardSkin.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">管理 - <%=RewardSkin.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. RewardBoardDb sb1 = new RewardBoardDb();
  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. RewardBoardDb sb = (RewardBoardDb)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.     </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"><select name="boardCode" onChange="if(this.options[this.selectedIndex].value=='no'){alert('您选择的是区域,请选择版块!'); this.selectedIndex=0;}">
  95.             <option value="" selected>请选择版块</option>
  96. <%
  97. leaf = dir.getLeaf(Leaf.CODE_ROOT);
  98. com.redmoon.forum.DirectoryView dv = new com.redmoon.forum.DirectoryView(leaf);
  99. dv.ShowDirectoryAsOptions(out, leaf, leaf.getLayer());
  100. %>
  101.           </select>
  102.           &nbsp;&nbsp;&nbsp;&nbsp;</td>
  103.         <td width="44%" align="left"><input type=submit value="设为支持<%=RewardSkin.LoadString(request, "name")%>功能"></td>
  104.         </tr></form>
  105.       </table>      <br></td>
  106.   </tr>
  107. </table>
  108. </td> </tr>             
  109.       </table>                                        
  110.        </td>                                        
  111.      </tr>                                        
  112.  </table>                                        
  113.                                
  114. </body>                                        
  115. </html>                            
  116.