ASP新录的新闻标题后面加new图片,如何实现
这是我的原代码,要如何实现一周的新闻后面有new图片SubListNewsShort_1(Classid,Rows,Titlelen,ShowTime)CallCheck...
这是我的原代码,要如何实现一周的新闻后面有new图片
Sub ListNewsShort_1(Classid,Rows,Titlelen,ShowTime)
Call CheckClassParent(Classid)
if classparent = 0 then
SqlTxt = "SELECT Top "&Rows&" * FROM View_PClassNews WHERE news_checked=1and news_del=0 and class_parent = "&Classid&" ORDER BY news_id DESC"
else
SqlTxt = "SELECT Top "&Rows&" * FROM View_PClassNews WHERE news_checked=1 and news_del=0 and class_id = "&Classid&" ORDER BY news_id DESC"
end if
Set Rssub = Server.CreateObject("ADODB.Recordset")
Rssub.Open SqlTxt,Conn,1,1%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<%
if Rssub.EOF then
Call Nodata()
Else
While NOT Rssub.EOF
%>
<tr>
<td width="84%" height="24">· <a href="News.asp?class_id=<%=Rssub("class_id") %>&news_id=<%=Rssub("news_id") %>" title="<%=Rssub("news_title")%>" target="_blank">
<% =DoTrimStr(Rssub("news_title"), Titlelen) %></a></td>
<td width="16%" align="right">
<%if ShowTime=1 then response.write("["&DoDateTime(Rssub("news_addtime"), 2)&"]")%></td>
</tr>
<%
Rssub.MoveNext()
WEnd
%>
<%End if%>
</table>
<%
Rssub.Close()
Set Rssub = Nothing
End Sub
%> 展开
Sub ListNewsShort_1(Classid,Rows,Titlelen,ShowTime)
Call CheckClassParent(Classid)
if classparent = 0 then
SqlTxt = "SELECT Top "&Rows&" * FROM View_PClassNews WHERE news_checked=1and news_del=0 and class_parent = "&Classid&" ORDER BY news_id DESC"
else
SqlTxt = "SELECT Top "&Rows&" * FROM View_PClassNews WHERE news_checked=1 and news_del=0 and class_id = "&Classid&" ORDER BY news_id DESC"
end if
Set Rssub = Server.CreateObject("ADODB.Recordset")
Rssub.Open SqlTxt,Conn,1,1%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<%
if Rssub.EOF then
Call Nodata()
Else
While NOT Rssub.EOF
%>
<tr>
<td width="84%" height="24">· <a href="News.asp?class_id=<%=Rssub("class_id") %>&news_id=<%=Rssub("news_id") %>" title="<%=Rssub("news_title")%>" target="_blank">
<% =DoTrimStr(Rssub("news_title"), Titlelen) %></a></td>
<td width="16%" align="right">
<%if ShowTime=1 then response.write("["&DoDateTime(Rssub("news_addtime"), 2)&"]")%></td>
</tr>
<%
Rssub.MoveNext()
WEnd
%>
<%End if%>
</table>
<%
Rssub.Close()
Set Rssub = Nothing
End Sub
%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询