levellist.asp
资源名称:图书管理系统.rar [点击查看]
上传用户:llrg7406
上传日期:2007-03-02
资源大小:654k
文件大小:1k
源码类别:
教育系统应用
开发平台:
Delphi
- <%@ Language=VBScript %>
- <%
- dim conn
- set conn = server.CreateObject("adodb.connection")
- conn.Open application("dsn")
- dim i_tab
- i_tab = 0
- sub recursion(id,m_title,m_type_id)
- dim rs
- Response.Write chr(10)
- for i = 1 to i_tab
- Response.Write " "
- next
- Response.Write "<dir title=""" & m_title & """ id=""" & m_type_id & """>"
- sql = "select id,title,type_id from bookwarelist where parent = '" & m_title & "'"
- flag = 0
- set rs = server.CreateObject("adodb.recordset")
- rs.Open sql,conn
- if not rs.EOF then
- flag = 1
- i_tab = i_tab + 1
- end if
- while not rs.eof
- id0 = rs("id")
- title0 = rs("title")
- type_id0 = rs("type_id")
- call recursion(id0,title0,type_id0)
- rs.movenext
- wend
- rs.close
- set rs = nothing
- if flag = 1 then
- i_tab = i_tab - 1
- Response.Write chr(10)
- for i = 1 to i_tab
- Response.Write " "
- next
- end if
- Response.Write "</dir>"
- end sub
- 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")
- i_tab = i_tab + 1
- call recursion(id1,title1,type_id1)
- i_tab = i_tab - 1
- rs1.movenext
- wend
- %>