扁带运动 中国:asp这段代码怎样才能分成两行每行6个显示?

来源:百度文库 编辑:神马品牌网 时间:2024/04/30 10:58:31
Private Function body9
If Minute(Now())=0 And Application(appName&"index_body_xu9")<>Hour(Now()) Then
Application.Lock()
Application.Contents.Remove(appName&"index_body9")
Application.Contents.Remove(appName&"index_body_xu9")
Application.UnLock()
End If
If IsEmpty(Application(appName&"index_body9")) Then
Dim str, rsb, rs2, pic, text, used_id
Application(appName&"index_body_xu9")=Hour(Now())
i=0:str="<div align=center><table width=710 align=center><tr>"&vbCrLf

strSql="SELECT top 10 id, class_name FROM V6bbs_big_class order by id desc"
Set rsb=conn.Execute(strSql)
V6.DoQuery(1)
While Not rsb.Eof
used_id="":pic="":text=""
strSql="SELECT top 12 P.id, B.board_name, P.board_id, P.title, P.uid, P.hits, P.post_time, P.miniature, P.miniature FROM V6bbs_"&V6bbs.bbsSet(4, 0)&" P INNER JOIN V6bbs_board B ON B.id=P.board_id WHERE B.big_class_id="&rsb(0)&" AND miniature<>'' AND B.is_close=0 AND B.is_hidden=0 AND P.parent_id=0 AND P.is_del=0 AND P.is_council=0 AND P.goods_id=0"&_
" AND NOT EXISTS (SELECT 1 FROM V6bbs_"&V6bbs.bbsSet(4, 0)&" WHERE parent_id=0 AND board_id=P.board_id AND id>P.id) ORDER BY P.post_time DESC"
Set rs=conn.Execute(strSql)
V6.DoQuery(1)
While Not rs.Eof
used_id=used_id&rs(0)&","
pic=pic&"<td><a href=""board/"&V6.IIF(V6bbs.bbsSet(82, 0)=1, "post,"&rs(0)&V6bbs.bbsSet(83, 0), "dis.asp?id="&rs(0))&""" title=""标 题:"&V6.HTML(rs(3), 2)&" 作 者:"&rs(4)&" 人 气:"&rs(5)&" 发表时间:"&rs(6)&"""><img src="""&Replace(rs("miniature"), "../", "")&""" width=""90"" height=""90"" hspace=""6"" vspace=""6"" style=""border-color:#666666;border-width:1px;""><br/>"&V6.HTML(V6.CutStr(rs(3), 12, ""), 2)&"</a></td>"&vbCrLf
rs.MoveNext
Wend
str=str&""&pic&""&vbCrLf
i=i+1
rsb.MoveNext
If i<>0 And i Mod 6=0 Then str=str&"</tr>"&vbCrLf&"<br>"&vbCrLf
Wend
rsb.Close
Set rsb=Nothing

str=str&"</table></div>"&vbCrLf
Application(appName&"index_body9")=str
End If
body9=Application(appName&"index_body9")
End Function
这样写的话就是乱序显示

何必这样繁,直接从数据库取12个miniature纪录不就行了

...