%
dim lmmc(12),str(12)
lmmc(0)="重要信息"
lmmc(1)="普法动态"
lmmc(2)="普法讲台"
lmmc(3)="法律试题"
lmmc(4)="以案说法"
for i=0 to 4
sql_sele="select top 6 title,title2,lmmc,id from pfzx where lmmc='"&lmmc(i)&"' order by indate desc,title"
set rs_sele=server.createobject("adodb.recordset")
rs_sele.open sql_sele,myconn,1,1
if not rs_sele.eof then
do while not rs_sele.eof
path="content.asp?lmmc="&rs_sele("lmmc")&"&id="&rs_sele("id")
titlelen=len(trim(rs_sele("title")))
if i<>0 then
if titlelen>20 then
tit=mid(rs_sele("title"),1,18)&"…"
else
tit=trim(rs_sele("title"))
end if
else
if titlelen>27 then
tit=mid(rs_sele("title"),1,24)&"…"
else
tit=trim(rs_sele("title"))
end if
end if
str(i)=str(i)&"