move_board.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import="cn.js.fan.web.*"%>
  3. <%@ page import="cn.js.fan.util.*"%>
  4. <%@ page import="com.redmoon.forum.*"%>
  5. <%@ taglib uri="/WEB-INF/tlds/LabelTag.tld" prefix="lt" %>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  7. <html>
  8. <head>
  9. <title><lt:Label res="res.label.forum.admin.move_board" key="move_board"/></title>
  10. <link href="default.css" rel="stylesheet" type="text/css">
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <style type="text/css">
  13. <!--
  14. .style1 {
  15. color: #FFFFFF;
  16. font-weight: bold;
  17. }
  18. .style2 {color: #FFFFFF}
  19. -->
  20. </style>
  21. </head>
  22. <body bgcolor="#FFFFFF" text="#000000">
  23. <jsp:useBean id="cfg" scope="page" class="cn.js.fan.web.Config"/>
  24. <jsp:useBean id="privilege" scope="page" class="cn.js.fan.module.pvg.Privilege"/>
  25. <%
  26. if (!privilege.isUserPrivValid(request, "forum.admin")) {
  27. out.print(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  28. return;
  29. }
  30. String rootpath = request.getContextPath();
  31. String bakpath = cfg.getProperty("Application.bak_path");
  32. String op = ParamUtil.get(request, "op");
  33. if (op.equals("move")) {
  34. String fromCode = ParamUtil.get(request, "fromCode");
  35. String toCode = ParamUtil.get(request, "toCode");
  36. try {
  37. MsgDb md = new MsgDb();
  38. int count = md.moveBoardMessages(fromCode, toCode);
  39. out.print(StrUtil.Alert(SkinUtil.LoadString(request, "res.label.forum.admin.move_board", "op_success") + count));
  40. }
  41. catch (ResKeyException e) {
  42. out.print(StrUtil.Alert(e.getMessage(request)));
  43. }
  44. }
  45. %>
  46. <table cellSpacing="0" cellPadding="0" width="100%">
  47.   <tbody>
  48.     <tr>
  49.       <td class="head"><lt:Label res="res.label.forum.admin.move_board" key="data_manage"/></td>
  50.     </tr>
  51.   </tbody>
  52. </table>
  53. <br>
  54. <TABLE 
  55. style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid" 
  56. cellSpacing=0 cellPadding=3 width="95%" align=center>
  57.   <TBODY>
  58.     <TR>
  59.       <TD class=thead style="PADDING-LEFT: 10px" noWrap width="70%"><lt:Label res="res.label.forum.admin.move_board" key="move_board"/>      </TD>
  60.     </TR>
  61.     <TR class=row style="BACKGROUND-COLOR: #fafafa">
  62.       <TD height="175" align="center" style="PADDING-LEFT: 10px"><table width="83%" border="0" align="center">
  63.   <form name=form1 action="?op=move" method=post>
  64.         <tr>
  65.           <td width="5%" height="28"><lt:Label res="res.label.forum.admin.move_board" key="from"/></td>
  66.           <td width="24%" height="22"><select name="fromCode" onChange="if(this.options[this.selectedIndex].value=='not'){alert(this.options[this.selectedIndex].text+' <lt:Label res="res.label.forum.admin.move_board" key="can_not_select"/>'); return false;}">
  67.             <option value="not" selected><lt:Label res="res.label.forum.admin.move_board" key="sel_board"/></option>
  68.             <%
  69. com.redmoon.forum.Directory directory = new com.redmoon.forum.Directory();
  70. com.redmoon.forum.Leaf lf = directory.getLeaf("root");
  71. com.redmoon.forum.DirectoryView dv = new com.redmoon.forum.DirectoryView(lf);
  72. dv.ShowDirectoryAsOptions(out, lf, lf.getLayer());
  73. %>
  74.           </select></td>
  75.           <td width="59%"> <lt:Label res="res.label.forum.admin.move_board" key="move_to"/>
  76.             <select name="toCode" onChange="if(this.options[this.selectedIndex].value=='not'){alert(this.options[this.selectedIndex].text+' <lt:Label res="res.label.forum.admin.move_board" key="can_not_select"/>'); return false;}">
  77.             <option value="not" selected><lt:Label res="res.label.forum.admin.move_board" key="sel_board"/></option>
  78.             <%
  79. dv.ShowDirectoryAsOptions(out, lf, lf.getLayer());
  80. %>
  81.           </select></td>
  82.           <td width="12%"><input value="<lt:Label key="ok"/>" type="submit"></td>
  83.         </tr>
  84.         </form>
  85.       </table></TD>
  86.     </TR>
  87.     <!-- Table Body End -->
  88.     <!-- Table Foot -->
  89.     <TR>
  90.       <TD class=tfoot align=right><DIV align=right> </DIV></TD>
  91.     </TR>
  92.     <!-- Table Foot -->
  93.   </TBODY>
  94. </TABLE>
  95. </body>
  96. </html>