many="top "&many
Set RsValue=server.CreateObject("ADODB.Recordset")
sqlValue="select "&many&" * from News "&SortV&" "&orderV
RsValue.open sqlValue,conn,3,3
If Not RsValue.eof Then
While Not RsValue.eof
response.write "<li>"
If timel=1 then
response.write "<span>["&Trim(Left(RsValue("InfoTime"),10))&"]
</span>"
Else
response.write ""
End If
response.write "<a href='index_con.asp?ID="&RsValue("ID")&"'
>"&Left(RsValue("Title"),lengthL)&"</a></li>"
RsValue.MoveNext
Wend
End If
End Function
我想在今日最新下面加new,请问怎么加的啊?
时间字段名是 Infotime 下面这段加上没用呢?
if news="1" then
if datediff("d",rs("Infotime"),date())<=5 then
Response.Write "<img src=images/new.gif>"
end if
end if
many="top "&many
Set RsValue=server.CreateObject("ADODB.Recordset")
sqlValue="select "&many&" * from News "&SortV&" "&orderV
RsValue.open sqlValue,conn,3,3
If Not RsValue.eof Then
While Not RsValue.eof
response.write "<li>"
If timel=1 then
response.write "<span>["&Trim(Left(RsValue("InfoTime"),10))&"]</span>"
Else
response.write ""
End If
response.write "<a href='index_con.asp?ID="&RsValue("ID")&"'
>"&Left(RsValue("Title"),lengthL)&"</a>"
'''''''''''''''''
if datediff("d",RsValue("Infotime"),date())<=5 then
Response.Write "<img src=images/new.gif>"
end if
'''''''''''''''''''''''
response.write "</li>"
RsValue.MoveNext
Wend
End If
End Function
if datediff(rs("Infotime"),date())<=5 then
if datediff("d",rs("Infotime"),date())<=5 then
Response.Write "<img src=images/new.gif>"
end if
下面这个判断没有生效~
if news="1" then
XXX
end if