ASP,新闻最后三条显示“new“字样,代码如下,请帮忙修改!

setrs3=server.CreateObject("ADODB.RecordSet")ifuselevel=1thenifRequest.cookies("key")... set rs3=server.CreateObject("ADODB.RecordSet")
if uselevel=1 then
if Request.cookies("key")="super" or Request.cookies("key")="typemaster" or Request.cookies("key")="bigmaster" or Request.cookies("key")="smallmaster" or Request.cookies("key")="check" then
rs3.Source ="select top " & top_img & " * from News where picnews=1 and checkked=1 and picname<>null order by NewsID DESC"
end if
if Request.cookies("key")="" then
rs3.Source ="select top " & top_img & " * from News where picnews=1 and checkked=1 and newslevel=0 and picname<>null order by NewsID DESC"
end if
if Request.cookies("key")="selfreg" then
if Request.cookies("reglevel")=3 then
rs3.Source ="select top " & top_img & " * from News where picnews=1 and checkked=1 and newslevel<=3 and picname<>null order by NewsID DESC"
end if
if Request.cookies("reglevel")=2 then
rs3.Source ="select top " & top_img & " * from News where picnews=1 and checkked=1 and newslevel<=2 and picname<>null order by NewsID DESC"
end if
if Request.cookies("reglevel")=1 then
rs3.Source ="select top " & top_img & " * from News where picnews=1 and checkked=1 and newslevel<=1 and picname<>null order by NewsID DESC"
end if
end if
else
rs3.Source ="select top " & top_img & " * from News where picnews=1 and checkked=1 and picname<>null order by NewsID DESC"
end if
rs3.Open rs3.Source,conn,1,1
if not rs3.EOF then
while not rs3.EOF
fileExt=lcase(getFileExtName(rs3("picname")))
Content=rs3("Content")
content=replace(content,"[[","<")
content=replace(content,"]]",">")
%>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="6" bgcolor="#FFFFFF">
<tr>
<td align="center" style="WORD-WRAP: break-word"><a class=middle href="ReadNews.asp?NewsID=<%=rs3("NewsID")%>" target=_blank title="<%=rs3("title")%>">
<%if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then%>
<img src="uploadfile/<%=rs3("picname")%>" width="133" height="100" class="border">
<%end if%>
<%if fileext="swf" then%>
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width="160" height="100">
<param name=movie value="uploadfile/<%=rs3("picname")%>">
<param name=quality value=high>
<param name='Play' value='-1'>
<param name='Loop' value='0'>
<param name='Menu' value='-1'>
<param name="wmode" value="transparent">
<embed src="uploadfile/<%=rs3("picname")%>" width="160" pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'></embed>
</object>
<%end if%>
<br>
展开
 我来答
bai_du_spy
2006-10-08 · TA获得超过573个赞
知道答主
回答量:73
采纳率:0%
帮助的人:0
展开全部
if top_img>rs3.recordCount then
Flag = rs3.recordCount
else
Flag = top_img
end if

while not rs3.EOF 改成 for i=1 to cint(top_img)
<!--放在要输入NEW的地方Begin-->
if Flag-i<=3 then
response.write \"new\"
end if
<!--放在要输入NEW的地方end-->
loop 改成 next
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式