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> 展开
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> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询