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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ page import="java.io.InputStream" %>
  3. <%@ page import="java.util.*" %>
  4. <%@ page import="cn.js.fan.db.*" %>
  5. <%@ page import="cn.js.fan.util.*" %>
  6. <%@ page import="com.redmoon.blog.*" %>
  7. <%@ page import="cn.js.fan.module.pvg.*" %>
  8. <%@ page import="cn.js.fan.web.*" %>
  9. <%@ taglib uri="/WEB-INF/tlds/LabelTag.tld" prefix="lt" %>
  10. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  11. <html>
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  14. <title></title>
  15. <LINK href="../../common.css" type=text/css rel=stylesheet>
  16. <LINK href="default.css" type=text/css rel=stylesheet>
  17. <script>
  18. function form1_onsubmit() {
  19. form1.type.value = form1.seltype.value;
  20. form1.root_code.value = window.parent.dirmainFrame.getRootCode();
  21. }
  22. function selTemplate(id)
  23. {
  24. if (form1.templateId.value!=id) {
  25. form1.templateId.value = id;
  26. }
  27. }
  28. function enableSelType() {
  29. if (confirm("<lt:Label res="res.label.blog.admin.dir" key="confirm"/>")) {
  30. form1.seltype.disabled = false;
  31. }
  32. }
  33. </script>
  34. </head>
  35. <body>
  36. <jsp:useBean id="privilege" scope="page" class="com.redmoon.forum.Privilege"/>
  37. <%
  38. if (!privilege.isMasterLogin(request))
  39. {
  40. out.print(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  41. return;
  42. }
  43. %>
  44. <%
  45. String parent_code = ParamUtil.get(request, "parent_code");
  46. if (parent_code.equals(""))
  47. parent_code = "root";
  48. String parent_name = ParamUtil.get(request, "parent_name");
  49. String code = ParamUtil.get(request, "code");
  50. String name = ParamUtil.get(request, "name");
  51. String description = ParamUtil.get(request, "description");
  52. String op = ParamUtil.get(request, "op");
  53. boolean isHome = false;
  54. int type = 0;
  55. if (op.equals(""))
  56. op = "AddChild";
  57. Leaf leaf = null;
  58. if (op.equals("modify")) {
  59. Directory dir = new Directory();
  60. leaf = dir.getLeaf(code);
  61. name = leaf.getName();
  62. description = leaf.getDescription();
  63. type = leaf.getType();
  64. isHome = leaf.getIsHome();
  65. }
  66. %>
  67. <TABLE 
  68. style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid" 
  69. cellSpacing=0 cellPadding=3 width="95%" align=center>
  70.   <!-- Table Head Start-->
  71.   <TBODY>
  72.     <TR>
  73.       <TD class=thead style="PADDING-LEFT: 10px" noWrap width="70%"><lt:Label res="res.label.blog.admin.dir" key="list_add_and_modify"/></TD>
  74.     </TR>
  75.     <TR class=row style="BACKGROUND-COLOR: #fafafa">
  76.       <TD align="center" style="PADDING-LEFT: 10px"><table class="frame_gray" width="415" border="0" cellpadding="0" cellspacing="1">
  77.         <tr>
  78.           <td width="411" align="center"><table width="98%">
  79.             <form name="form1" method="post" action="dir_top.jsp?op=<%=op%>" target="dirmainFrame" onClick="return form1_onsubmit()">
  80.               <tr>
  81.                 <td width="78" rowspan="7" align="left" valign="top"><br>
  82.                   <lt:Label res="res.label.blog.admin.dir" key="current_node"/><br>
  83.                     <font color=blue><%=parent_name.equals("")?SkinUtil.LoadString(request,"res.label.blog.admin.dir", "root_node"):parent_name%></font>
  84. </td>
  85.                 <td width="312" align="left"><lt:Label res="res.label.blog.admin.dir" key="code"/>
  86.                     <input name="code" value="<%=code%>" <%=op.equals("modify")?"readonly":""%>>
  87.                 </td>
  88.               </tr>
  89.               <tr>
  90.                 <td align="left"><lt:Label res="res.label.blog.admin.dir" key="name"/>
  91.                     <input name="name" value="<%=name%>"></td>
  92.               </tr>
  93.               <tr>
  94.                 <td align="left"><lt:Label res="res.label.blog.admin.dir" key="description"/>
  95.                     <input name="description" value="<%=description%>">
  96.                     <input type=hidden name=parent_code value="<%=parent_code%>">                    </td>
  97.               </tr>
  98.               <tr>
  99.                 <td align="left">
  100. <%
  101. String disabled = "";
  102. if (op.equals("modify") && leaf.getType()>=1)
  103. disabled = "true";
  104. %>
  105. <lt:Label res="res.label.blog.admin.dir" key="type"/>
  106.                   <select name="seltype">
  107.                     <option value="<%=Leaf.TYPE_NONE%>"><lt:Label res="res.label.blog.admin.dir" key="class"/></option>
  108.                     <option value="<%=Leaf.TYPE_LIST%>" <%=op.equals("AddChild")?"selected":""%>><lt:Label res="res.label.blog.admin.dir" key="list"/></option>
  109.                   </select>
  110.   <script>
  111.   <%if (op.equals("modify")) {%>
  112.   form1.seltype.value = "<%=type%>"
  113.   <%}%>
  114.   form1.seltype.disabled = "<%=disabled%>"
  115.   </script>
  116.   <input type=hidden name=root_code value="">
  117.   <input type=hidden name="type" value="<%=type%>">
  118.                   <input type=hidden name="templateId" class="singleboarder" value="<%=op.equals("modify")?""+leaf.getTemplateId():"-1"%>" size=3 readonly>
  119. &nbsp; </td>
  120.               </tr>
  121.               <tr>
  122.                 <td align="left"><span class="unnamed2">
  123.                   <%if (op.equals("modify")) {%>
  124.                   <script>
  125.   var bcode = "<%=leaf.getCode()%>";
  126.       </script>
  127. &nbsp;<lt:Label res="res.label.blog.admin.dir" key="parent_node"/>
  128. <select name="parentCode">
  129. <%
  130. Leaf rootlf = leaf.getLeaf("root");
  131. DirectoryView dv = new DirectoryView(rootlf);
  132. dv.ShowDirectoryAsOptionsWithCode(out, rootlf, rootlf.getLayer());
  133. %>
  134. </select>
  135. <script>
  136. form1.parentCode.value = "<%=leaf.getParentCode()%>";
  137. </script>
  138. <%}%>
  139.                 </span></td>
  140.               </tr>
  141.               <tr>
  142.                 <td align="left">
  143. <%if (op.equals("modify")) {%>
  144. <input type="checkbox" name="isHome" value="<%=isHome?"false":"true"%>" >
  145. <%}else{%>
  146. <input type="checkbox" name="isHome" value="true" >
  147. <%}%>
  148. <lt:Label res="res.label.blog.admin.dir" key="whether_set_first_page"/>
  149. <input type="hidden" name="pluginCode" value="default">
  150. </td>
  151.               </tr>
  152.               <tr>
  153.                 <td align="center"><input name="Submit" type="submit" class="singleboarder" value="<lt:Label res="res.label.blog.admin.dir" key="submit"/>">
  154.                   &nbsp;&nbsp;&nbsp;
  155.                   <input name="Submit" type="reset" class="singleboarder" value="<lt:Label res="res.label.blog.admin.dir" key="reset"/>">
  156.                   &nbsp;&nbsp;&nbsp;
  157.                   <input type="button" class="singleboarder" value="<lt:Label res="res.label.blog.admin.dir" key="coerce_type_modify"/>" onClick="enableSelType()"></td>
  158.               </tr>
  159.             </form>
  160.           </table></td>
  161.         </tr>
  162.       </table>
  163.       </TD>
  164.     </TR>
  165.     <!-- Table Body End -->
  166.     <!-- Table Foot -->
  167.     <TR>
  168.       <TD class=tfoot align=right><DIV align=right> </DIV></TD>
  169.     </TR>
  170.     <!-- Table Foot -->
  171.   </TBODY>
  172. </TABLE>
  173. </body>
  174. </html>