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

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="cn.js.fan.module.cms.*" %>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <title>测试board无限级目录</title>
  12. <LINK href="../common.css" type=text/css rel=stylesheet>
  13. <LINK href="default.css" type=text/css rel=stylesheet>
  14. </head>
  15. <body>
  16. <jsp:useBean id="privilege" scope="page" class="com.fan.redmoon.Privilege"/>
  17. <%
  18. if (!privilege.isAdmin(request))
  19. {
  20. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  21. return;
  22. }
  23. %>
  24. <%
  25. String root_code = ParamUtil.get(request, "root_code");
  26. if (root_code.equals(""))
  27. {
  28. root_code = "root";
  29. }
  30. Leaf leaf = new Leaf(root_code);
  31. String root_name = leaf.getName();
  32. int root_layer = leaf.getLayer();
  33. %>
  34. <table width='100%' cellpadding='0' cellspacing='0' >
  35.   <tr>
  36.     <td class="head">管理&nbsp;<%=root_name%>&nbsp;&nbsp;<a href="dir_sub.jsp?root_code=<%=StrUtil.UrlEncode(root_code)%>">树形模式</a></td>
  37.   </tr>
  38. </table>
  39. <br>
  40. <TABLE class="frame_gray"  
  41. cellSpacing=0 cellPadding=0 width="95%" align=center>
  42.   <TBODY>
  43.     <TR>
  44.       <TD height=200 valign="top" bgcolor="#FFFBFF">
  45. <table class="tbg1" cellspacing=0 cellpadding=0 width="100%" align=center onMouseOver="this.className='tbg1sel'" onMouseOut="this.className='tbg1'" 
  46. border=0>
  47.           <tbody>
  48.             <tr>
  49.               <td width="6%" height="13" align=left nowrap>&nbsp;              </td>
  50.             <td width="79%" align=left nowrap><a href="document_list_m.jsp?dir_code=<%=StrUtil.UrlEncode(root_code)%>&dir_name=<%=StrUtil.UrlEncode(root_name)%>"><%=root_name%></a>&nbsp;&nbsp;&nbsp;&nbsp; </td>
  51.               <td width="15%" align=right nowrap>&nbsp;
  52.   </td>
  53.             </tr>
  54.           </tbody>
  55.         </table>
  56. <%
  57. ResultIterator ri = leaf.getAllChild();
  58. ResultRecord rs = null;
  59. String code="",name="",add_date="",description="";
  60. int layer = 1;
  61. int i = 0;
  62. //写跟贴
  63. while (ri.hasNext())
  64. {
  65.   rs = (ResultRecord) ri.next();
  66.   i++;
  67.   code = rs.getString("code");
  68.   name = rs.getString("name");
  69.   layer = rs.getInt("layer");
  70.   add_date = rs.getString("add_date");
  71.   description = rs.getString("description");
  72.   %>
  73.         <table class="tbg1" cellspacing=0 cellpadding=0 width="100%" align=center onMouseOver="this.className='tbg1sel'" onMouseOut="this.className='tbg1'" 
  74. border=0>
  75.           <tbody>
  76.             <tr>
  77.               <td width="6%" height="13" align=left nowrap>&nbsp;   </td>
  78.             <td width="79%" align=left nowrap><%for (int k=1; k<=layer-root_layer-1; k++){%>
  79.               <img src="" width=18 height=1>
  80.               <%}%>
  81.               <img src="images/i_plus-2-3.gif" align="absmiddle"> <a href="document_list_m.jsp?dir_code=<%=StrUtil.UrlEncode(code)%>&dir_name=<%=StrUtil.UrlEncode(name)%>"><%=name%></a>&nbsp;&nbsp;&nbsp;&nbsp; </td>
  82.               <td width="15%" align=right nowrap>&nbsp;
  83.   </td>
  84.             </tr>
  85.           </tbody>
  86.         </table>
  87.       <%
  88. }
  89. %></TD>
  90.     </TR>
  91.   </TBODY>
  92. </TABLE>
  93. </body>
  94. </html>