%newshu=10 '每个分类显示最新文章数
set rs=server.CreateObject("ADODB.RecordSet")
set rs_info=server.CreateObject("ADODB.RecordSet")
set rs_yl=server.CreateObject("ADODB.RecordSet")
i=0
sql="select top 10 title,id from info where date>Now()-7 order by hits desc"
rs.open sql,conn,1,1
if rs.eof then
top="还没有文章"
else
do while not rs.eof
top=top&"·"&rs("title")&" "
i=i+1
if i>=10 then exit do
rs.movenext
loop
end if
rs.close
list=list&"| "
rs.open "select * from infotype where tj=1 order by id",conn,1,1
if NOT rs.EOF then
allshu=rs.recordcount
Dim list_1(20)
Dim list_2(20)
Dim list_3(20)
do while NOT rs.EOF
ii=ii+1
list=list&""&split(rs("tname"),"|")(rs("tj")-1)&" | "
list_1(ii)=""&split(rs("tname"),"|")(rs("tj")-1)&""
list_2(ii)=" ·更多内容 - ->>"
i=0
sqqq_yl=""
sql_yl="select * from infotype where ts like '"&rs("ts")&"%'"
rs_yl.open sql_yl,conn,1,1
if not rs_yl.eof then
do while not rs_yl.eof
sqqq_yl=sqqq_yl& " or tid="&rs_yl("id")&""
rs_yl.MoveNext
loop
end if
rs_yl.close
rs_info.open "select id,title,date from info where tid="&rs("id")&""&sqqq_yl&" order by id desc",conn,1,1
if NOT rs_info.EOF then
do while not rs_info.eof
list_3(ii)=list_3(ii)&"·"&rs_info("title")&" "
i=i+1
if i>=newshu then exit do
rs_info.movenext
loop
end if
rs_info.close
rs.MoveNext
loop
end if
rs.close
set rs=nothing
set rs_yl=nothing
set rs_info=nothing
conn.close
set conn=nothing%>