下面是一段ASP的代码,请问如何才能在将发布天数小于4天的时候在后面显示NEW图片?

来源:百度知道 编辑:UC知道 时间:2024/06/01 21:46:00
<%
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
i

你的代码一个中文注释都没有,不仔细看了。

如果,rs("updatetime")是你的发布时间,
那么,DateDiff("d",rs("updatetime"),now())<4,当前时间减去updatetime时间小于4。

这样你的问题应该就很好解决了

支持楼上,楼主的程序太长了,我也看花了眼.