levellistcreate.asp
资源名称:图书管理系统.rar [点击查看]
上传用户:llrg7406
上传日期:2007-03-02
资源大小:654k
文件大小:3k
源码类别:
教育系统应用
开发平台:
Delphi
- <%@ Language=VBScript %>
- <!--#include file ="identify.asp"-->
- <%
- dim conn
- set conn = server.CreateObject("adodb.connection")
- conn.Open application("dsn")
- sub recursion(id,m_title,m_type_id)
- dim rs
- %>
- <a name="aa<%=id%>"></a>
- <table WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
- <tr>
- <td colspan="2">
- <a href="#aa<%=id%>" onclick="diva_show('<%=id%>','<%=m_type_id%>');" id="link<%=id%>">
- <img name="f<%=id%>" SRC="images/plus1.gif" border="0" WIDTH="16" HEIGHT="18">
- <img name="i<%=id%>" SRC="images/icon_book_close.gif" border="0"><%=m_title%></a><br>
- </td>
- </tr>
- </table>
- <div id="a<%=id%>" style="display:none">
- <table WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
- <%
- sql = "select id,title,type_id from bookwarelist where parent = '" & m_title & "'"
- set rs = server.CreateObject("adodb.recordset")
- rs.Open sql,conn
- while not rs.eof
- id0 = rs("id")
- title0 = rs("title")
- type_id0 = rs("type_id")
- %>
- <tr>
- <td width="18"> </td>
- <td>
- <% call recursion(id0,title0,type_id0)%>
- </td>
- </tr>
- <%
- rs.movenext
- wend
- rs.close
- set rs = nothing
- %>
- </table>
- </div>
- <%
- end sub
- %>
- <html>
- <head>
- <meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
- <link rel="stylesheet" type="text/css" href="xcss.css">
- <script language="javascript">
- current_div_id = -1;
- function diva_show(div_id,type_id)
- {
- if (document.all.item("a"+div_id).style.display == "block")
- {
- document.all.item("a"+div_id).style.display = "none";
- document.all.item("i"+div_id).src="images/icon_book_close.gif";
- document.all.item("f"+div_id).src="images/plus1.gif";
- }
- else
- {
- document.all.item("a"+div_id).style.display = "block";
- document.all.item("i"+div_id).src="images/icon_book_open.gif";
- document.all.item("f"+div_id).src="images/minus.gif";
- }
- if (current_div_id != -1)
- {
- document.all.item("link"+current_div_id).style.color = "#000066";
- }
- current_div_id = div_id;
- document.all.item("link"+div_id).style.color = "red";
- if ((type_id != '0')&&(type_id != ''))
- {
- top.xbody.window.location = "booklist.asp?b_type=" + type_id;
- }
- }
- </script>
- </head>
- <body topmargin="0" background="images/zapsmbknd.gif">
- <table WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
- <tr>
- <td colspan="2"><img SRC="images/win16.gif" WIDTH="16" HEIGHT="16"> <font style="font-family:隶书,Arial;font-size:20px;font-weight:bold">书库</font></td>
- </tr>
- </table>
- <table WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
- <%
- sql1 = "select id,title,type_id from bookwarelist where parent = '书库'"
- set rs1 = server.CreateObject("adodb.recordset")
- rs1.Open sql1,conn
- while not rs1.eof
- id1 = rs1("id")
- title1 = rs1("title")
- type_id1 = rs1("type_id")
- %>
- <tr>
- <td width="1"> </td>
- <td>
- <% call recursion(id1,title1,type_id1)%>
- </td>
- </tr>
- <%
- rs1.movenext
- wend
- %>
- </table>
- </body>
- </html>