求助:怎么在asp程序里面最近5天的新闻后面加new图标?

<!--#includefile=include/conn.asp--><!--#includefile=include/config.asp--><!--#includ... <!--#include file=include/conn.asp -->
<!--#include file=include/config.asp -->
<!--#include file=include/function.asp -->
<!--#include file="admin/char.inc"-->
<%
dim shu,news,bigclassid,smallclassid,specialid,order,time,path,click,title
bigclassid=checkstr(request.querystring("bigclassid"))
typeid=checkstr(request.querystring("typeid"))
smallclassid=checkstr(request.querystring("smallclassid"))
specialid=checkstr(request.querystring("specialid"))
shu=checkstr(request.querystring("shu"))
order=checkstr(request("order"))
time=checkstr(request.querystring("time"))
title=checkstr(request.querystring("title"))
click=checkstr(request.querystring("click"))
Path = "./"
if shu<>"" then '显示数目,不加为10
ss=shu
else
ss=10
end if
if order="click" then '排序方式,click为按点击率
oo="click"
else
oo="newsid"
end if
if time="0" then '显示时间,0为不显示
tt=0
else
tt=1
end if
if click="0" then '显示点击数,0为不显示
cc=0
else
cc=1
end if
if title<>"" then '显示数目,不加为10
nn=title
else
nn=24
end if
if typeid<>"" then
set rs=conn.execute("SELECT top "&ss&" * FROM news where typeid=cint("&typeid&") and checkked=1 order by "&oo&" desc")
else
if bigclassid<>"" then
set rs=conn.execute("SELECT top "&ss&" * FROM news where bigclassid=cint("&bigclassid&") and checkked=1 order by "&oo&" desc")
else
if smallclassid<>"" then
set rs=conn.execute("SELECT top "&ss&" * FROM news where smallclassid=cint("&smallclassid&") and checkked=1 order by "&oo&" desc")
else
if specialid<>"" then
set rs=conn.execute("SELECT top "&ss&" * FROM news where specialid=cint("&specialid&") and checkked=1 order by "&oo&" desc")
else
set rs=conn.execute("SELECT top "&ss&" * FROM news where checkked=1 order by "&oo&" desc")
end if
end if
end if
end if
if rs.eof and rs.bof then %>
document.write('没有');
<% else
do while not rs.eof

title=trim(rs("title"))
title=replace(title,"<br>","")
if strcomp(left(title,nn),title)<0 then
%>
document.write(' · <font class=3><A href="<%=path%>ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=title%>" target="_blank"><FONT color="#000000"><%=left(title,nn)%></FONT></A><%if tt=1 then%><FONT color="#000000">[<%=month(rs("updatetime"))%>-<%=day(rs("updatetime"))%>]</FONT><br><%end if%></font>');
<%else%>
document.write(' · <font class=3><A href="<%=path%>ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=title%>" target="_blank"><FONT color="#000000"><%=left(title,nn)%></FONT></A><%if tt=1 then%><FONT color="#000000">[<%=month(rs("updatetime"))%>-<%=day(rs("updatetime"))%>]</FONT><br><%end if%></font>');

<%

end if
rs.movenext
loop
end if
Rs.Close
set Rs=nothing
%>

这个是调用新闻的代码页面
www.jkq.gov.cn这个的网站
哪个给我解决了,我给他加50分!
展开
 我来答
super_manager
推荐于2016-03-04 · TA获得超过698个赞
知道小有建树答主
回答量:248
采纳率:0%
帮助的人:320万
展开全部
<!--#include file=include/conn.asp -->
<!--#include file=include/config.asp -->
<!--#include file=include/function.asp -->
<!--#include file="admin/char.inc"-->
<%
dim shu,news,bigclassid,smallclassid,specialid,order,time,path,click,title
bigclassid=checkstr(request.querystring("bigclassid"))
typeid=checkstr(request.querystring("typeid"))
smallclassid=checkstr(request.querystring("smallclassid"))
specialid=checkstr(request.querystring("specialid"))
shu=checkstr(request.querystring("shu"))
order=checkstr(request("order"))
time=checkstr(request.querystring("time"))
title=checkstr(request.querystring("title"))
click=checkstr(request.querystring("click"))
Path = "./"
if shu<>"" then '显示数目,不加为10
ss=shu
else
ss=10
end if
if order="click" then '排序方式,click为按点击率
oo="click"
else
oo="newsid"
end if
if time="0" then '显示时间,0为不显示
tt=0
else
tt=1
end if
if click="0" then '显示点击数,0为不显示
cc=0
else
cc=1
end if
if title<>"" then '显示数目,不加为10
nn=title
else
nn=24
end if
if typeid<>"" then
set rs=conn.execute("SELECT top "&ss&" * FROM news where typeid=cint("&typeid&") and checkked=1 order by "&oo&" desc")
else
if bigclassid<>"" then
set rs=conn.execute("SELECT top "&ss&" * FROM news where bigclassid=cint("&bigclassid&") and checkked=1 order by "&oo&" desc")
else
if smallclassid<>"" then
set rs=conn.execute("SELECT top "&ss&" * FROM news where smallclassid=cint("&smallclassid&") and checkked=1 order by "&oo&" desc")
else
if specialid<>"" then
set rs=conn.execute("SELECT top "&ss&" * FROM news where specialid=cint("&specialid&") and checkked=1 order by "&oo&" desc")
else
set rs=conn.execute("SELECT top "&ss&" * FROM news where checkked=1 order by "&oo&" desc")
end if
end if
end if
end if
if rs.eof and rs.bof then %>
document.write('没有');
<% else
km=1
do while not rs.eof

title=trim(rs("title"))
title=replace(title,"<br>","")
if strcomp(left(title,nn),title)<0 then
%>
document.write(' · <font class=3><A href="<%=path%>ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=title%>" target="_blank"><FONT color="#000000"><%=left(title,nn)%></FONT></A><%if tt=1 then%><FONT color="#000000">[<%=month(rs("updatetime"))%>-<%=day(rs("updatetime"))%>]</FONT><br><%end if%></font>');
<%else%>
document.write(' · <font class=3><A href="<%=path%>ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=title%>" target="_blank"><FONT color="#000000"><%=left(title,nn)%></FONT></A><%if tt=1 then%><FONT color="#000000">[<%=month(rs("updatetime"))%>-<%=day(rs("updatetime"))%>]</FONT><br><%end if%></font>');

<%
if km<6 then
%>
document.write('<img src='images/new.gif'>');
<%end if
end if
km=km+1
rs.movenext
loop
end if
Rs.Close
set Rs=nothing
%>
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
元烁蒙沛儿
2019-04-27 · TA获得超过3628个赞
知道大有可为答主
回答量:3047
采纳率:28%
帮助的人:391万
展开全部
代码发给我,我给你加吧。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式