从动网中提出的无限分类

来源:互联网 发布:linux解压指定目录命令 编辑:程序博客网 时间:2024/04/27 23:15

<!--#include  file="CONN.asp"-->
<style  type="text/css"><!--body,td,th  {font-size:  11pt;}--></style>
<%
Dim  Sql,i,BoardCount
OpenConn()
Set  Rs=Server.CreateObject("Adodb.Recordset")
sql="select  *  from  Y_board  where  depth<=3  order  by  rootid,orders"    '  通过更改Depth的深度可以使程序更快
Rs.open  Sql  ,  Conn,1,1
BoardCount=rs.recordcount
do  while  not  rs.EOF
dim  BoardJumpList
select  case  rs("Depth")
case  0
BoardJumpList  =  BoardJumpList  &  "╋"
case  1
BoardJumpList  =  BoardJumpList  &  "&nbsp;&nbsp;├"
end  select
'  这一下可以选出二级分类了!呵!:)
if  rs("depth")>1  then
for  i=2  to  rs("depth")
BoardJumpList  =  BoardJumpList  &  "&nbsp;&nbsp;│"
next
BoardJumpList  =  BoardJumpList  &  "&nbsp;&nbsp;├"
end  if
BoardJumpList  =  BoardJumpList  &  rs("boardtype")&"<BR>"
rs.MoveNext
loop
set  rs=nothing
response.write  BoardJumpList
%>

原创粉丝点击