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.auction.*"%>
  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 href="../../../admin/default.css" type=text/css rel=stylesheet>
  15. <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
  16. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  17. <title>插件管理</title>
  18. <body bgcolor="#FFFFFF" topmargin='0' leftmargin='0'>
  19. <jsp:useBean id="privilege" scope="page" class="cn.js.fan.module.pvg.Privilege"/>
  20. <%
  21. if (!privilege.isUserPrivValid(request, "forum.plugin"))
  22. {
  23. out.print(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  24. return;
  25. }
  26. String code = "auction";
  27. PluginMgr pm = new PluginMgr();
  28. PluginUnit pu = pm.getPluginUnit(code);
  29. String op = ParamUtil.get(request, "op");
  30. if (op.equals("addBoard")) {
  31. AuctionBoardDb sb = new AuctionBoardDb();
  32. String boardCode = ParamUtil.get(request, "boardCode");
  33. AuctionSkin sv = new AuctionSkin();
  34. if (!boardCode.equals("")) {
  35. if (sb.create(boardCode, ""))
  36. out.print(StrUtil.Alert(sv.LoadString(request, "addBoardSucceed")));
  37. else
  38. out.print(StrUtil.Alert(sv.LoadString(request, "addBoardFail")));
  39. }
  40. }
  41. if (op.equals("del")) {
  42. AuctionBoardDb sb = new AuctionBoardDb();
  43. String boardCode = ParamUtil.get(request, "boardCode");
  44. sb = sb.getAuctionBoardDb(boardCode);
  45. AuctionSkin sv = new AuctionSkin();
  46. if (!boardCode.equals("")) {
  47. if (sb.del())
  48. out.print(StrUtil.Alert("操作成功!"));
  49. else
  50. out.print(StrUtil.Alert("操作失败!"));
  51. }
  52. }
  53. %>
  54. <table width='100%' cellpadding='0' cellspacing='0' >
  55.   <tr>
  56.     <td class="head">管理插件-<%=AuctionSkin.LoadString(request, "name")%></td>
  57.   </tr>
  58. </table>
  59. <br>
  60. <table width="98%" border='0' align="center" cellpadding='0' cellspacing='0' class="frame_gray">
  61.   <tr> 
  62.     <td height=20 align="left" class="thead">管理 - <%=AuctionSkin.LoadString(request, "name")%></td>
  63.   </tr>
  64.   <tr> 
  65.     <td valign="top"><table width="82%"  border="0" align="center">
  66.       <tr>
  67.         <td height="34" align="center"><img src="../../../../images/arrow.gif" width="5" height="7">&nbsp;<a href="order.jsp?">管理订单</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="../../../../images/arrow.gif" width="5" height="7">&nbsp;<a href="catalog_frame.jsp">管理商品目录</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="../../../../images/arrow.gif" width="5" height="7">&nbsp;<a href="shop_list.jsp">管理商店</a></td>
  68.       </tr>
  69.     </table>
  70.       <br>
  71.       <table width="86%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" class="tableframe_gray">
  72.       <tr align="center">
  73.         <td width="19%" height="24" bgcolor="#EFEBDE">版面编码</td>
  74.       <td width="35%" height="22" bgcolor="#EFEBDE">版面名称</td>
  75.         <td width="46%" height="22" bgcolor="#EFEBDE">操作</td>
  76.       </tr>
  77. <%
  78. AuctionBoardDb sb1 = new AuctionBoardDb();
  79. Vector v = sb1.list();
  80. Iterator ir = v.iterator();
  81. Leaf leaf = null;
  82. com.redmoon.forum.Directory dir = new com.redmoon.forum.Directory();
  83. while (ir.hasNext()) {
  84. AuctionBoardDb sb = (AuctionBoardDb)ir.next();
  85. leaf = dir.getLeaf(sb.getBoardCode());
  86. %>   
  87.       <tr align="center">
  88.         <td height="22" bgcolor="#FFFFFF"><%=leaf==null?"该版块已不存在":leaf.getCode()%></td>
  89.       <td height="22" bgcolor="#FFFFFF"><%=leaf==null?"":leaf.getName()%></td>
  90.         <td height="22" bgcolor="#FFFFFF"><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>
  91.       </tr>
  92. <%}%>   
  93.     </table>
  94.       <br>
  95.       <table width="86%"  border="0" align="center" cellpadding="0" cellspacing="0">
  96.   <form action="?op=addBoard" method=post>
  97.         <tr>
  98.           <td width="56%" align="right"><select name="boardCode" onChange="if(this.options[this.selectedIndex].value=='not'){alert('您选择的是区域,请选择版块!'); this.selectedIndex=0;}">
  99.             <option value="" selected>请选择版块</option>
  100. <%
  101. leaf = dir.getLeaf(Leaf.CODE_ROOT);
  102. com.redmoon.forum.DirectoryView dv = new com.redmoon.forum.DirectoryView(leaf);
  103. dv.ShowDirectoryAsOptions(out, leaf, leaf.getLayer());
  104. %>
  105.           </select>
  106.           &nbsp;&nbsp;&nbsp;&nbsp;</td>
  107.         <td width="44%" align="left"><input type=submit value="设为支持<%=AuctionSkin.LoadString(request, "name")%>功能"></td>
  108.         </tr></form>
  109.       </table>
  110.     </td>
  111.   </tr>
  112. </table>
  113. </td> </tr>             
  114.       </table>                                        
  115.        </td>                                        
  116.      </tr>                                        
  117.  </table>                                        
  118.                                
  119. </body>                                        
  120. </html>                            
  121.