<!-----------------公告修改过的代码--------------->
<%
ggnum=conn.execute("select count(id) from gonggao where showid=0 or showid=-1")(0)
sql="select * from gonggao where showid=0 or showid=-1 order by affichetime Desc"
set rs=conn.execute(sql)
do while not rs.eof
id=rs("id")
affichetitle=rs("affichetitle")
affichecontent=rs("affichecontent")
affichetime=rs("affichetime")
afficheman=rs("afficheman")
hide=rs("hide")
lifetime=rs("lifetime")
if hide=0 then
if lifetime<>empty then 
if datediff("d",date(),rs("lifetime"))>=0 then
%>
<a style=cursor:hand onclick="javascript:open('affiche.asp?id=<%=rs("id")%>','','')">
<%if rs("jiacu")="1" then %>
<b>
<% end if%>
<font color=<%=rs("zhong")%>>
<%=affichetitle%>
</font>
<% if rs("jiacu")="1" then %>
</b>
<%end if %>
</a>(<%=datevalue(affichetime)%>)
<%
if ggnum>1 then
response.write("　　　")
end if
end if
elseif lifetime="" then
%>
<a style=cursor:hand onclick="javascript:open('affiche.asp?id=<%=rs("id")%>','','')">
<%if rs("jiacu")="1" then %>
<b>
<% end if%>
<font color=<%=rs("zhong")%>>
<%=affichetitle%>
</font>
<% if rs("jiacu")="1" then %>
</b>
<%end if %>
</a>[<%=datevalue(affichetime)%>]
<% 
if ggnum>1 then
response.write("　　　")
end if
end if
end if
rs.movenext
loop
if rs.eof and rs.bof then
response.write("<b>当前没有公告</b>("&datevalue(now())&")")
end if
rs.close
%>
</marquee>
<!------------------------------------------------>