首页公告上下二条分色显示
作者:cmscn 日期:2005-08-11

公告代码,显示5个的,但没分色的
-------------------------------
<table width='95%' border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center>
<%
tmp1="<font class=gray>暂时没有网站公告!</font>"
sql="select top 5 id,topic,tim from bbs_cast where sort='news' order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
'if not rs.eof then
topic=rs("topic")
tmp1="<tr><a href='update.asp?action=news#"&rs("id")&"' alt='公告标题:"&joekoe_cms.code_html(topic,1,0)&"<br>公告时
间:"&rs("tim")&"<br><font class=gray>点击浏览详细……</font>' target=_blank>"&joekoe_cms.code_html(topic,1,18)&"</a></tr>"
'end if
response.write tmp1
tmp1=""
%></td>
</tr><% rs.movenext
loop
rs.close %>
</table>
----------------------------------

<table width='95%' border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center>
<%
dim i,td_tmp
i=1
tmp1="<font class=gray>暂时没有网站公告!</font>"
sql="select top 5 id,topic,tim from bbs_cast where sort='news' order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
'if not rs.eof then
td_tmp="bgcolor='#808080'"
if (i mod 2)=0 then td_tmp="bgcolor='#FFFFFF'"
i=i+1
topic=rs("topic")
tmp1="<tr><td "&td_tmp&"><a href='update.asp?action=news#"&rs("id")&"' alt='公告标题:"&joekoe_cms.code_html(topic,1,0)&"<br>公告时
间:"&rs("tim")&"<br><font class=gray>点击浏览详细……</font>' target=_blank>"&joekoe_cms.code_html(topic,1,18)&"</a></td></tr>"
'end if
response.write tmp1
tmp1=""
%></td>
</tr><% rs.movenext
loop
rs.close %>
</table>
<tr>
<td align=center>
<%
dim i,td_tmp
i=1
tmp1="<font class=gray>暂时没有网站公告!</font>"
sql="select top 5 id,topic,tim from bbs_cast where sort='news' order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
'if not rs.eof then
td_tmp="bgcolor='#808080'"
if (i mod 2)=0 then td_tmp="bgcolor='#FFFFFF'"
i=i+1
topic=rs("topic")
tmp1="<tr><td "&td_tmp&"><a href='update.asp?action=news#"&rs("id")&"' alt='公告标题:"&joekoe_cms.code_html(topic,1,0)&"<br>公告时
间:"&rs("tim")&"<br><font class=gray>点击浏览详细……</font>' target=_blank>"&joekoe_cms.code_html(topic,1,18)&"</a></td></tr>"
'end if
response.write tmp1
tmp1=""
%></td>
</tr><% rs.movenext
loop
rs.close %>
</table>
评论: 7 | 引用: 0 | 查看次数: 718
发表评论