<%set rs2=server.CreateObject("adodb.recordset")
sql2="select * from news where id is not null order by creatime desc"
rs2.open sql2,conn,1,1
if not rs2.eof and not rs2.bof then
do while not rs2.eof
if cstr(rs2("id"))=cstr(request("showid")) then
%>
<%
rs2.moveprevious
if not rs2.bof then
%>
<<a href="newsshow.asp?showid=<%=rs2("id")%>" class="a6">上一条</a> <%
rs2.move(2)
if not rs2.eof then
%>
<a href="newsshow.asp?showid=<%=rs2("id")%>" class="a6">下一条</a>
<%else
%>
<a href="#" class="a6">已到最后一条</a>
<%end if%>
<%else
%>
<<a href="#" class="a6">已到头条</a> <%rs2.move(2)%><a href="newsshow.asp?showid=<%=rs2("id")%>" class="a6">下一条</a>
<%
end if%>
<%
exit do
end if
rs2.movenext
loop
end if
rs2.close
set rs2=nothing
%>
sql2="select * from news where id is not null order by creatime desc"
rs2.open sql2,conn,1,1
if not rs2.eof and not rs2.bof then
do while not rs2.eof
if cstr(rs2("id"))=cstr(request("showid")) then
%>
<%
rs2.moveprevious
if not rs2.bof then
%>
<<a href="newsshow.asp?showid=<%=rs2("id")%>" class="a6">上一条</a> <%
rs2.move(2)
if not rs2.eof then
%>
<a href="newsshow.asp?showid=<%=rs2("id")%>" class="a6">下一条</a>
<%else
%>
<a href="#" class="a6">已到最后一条</a>
<%end if%>
<%else
%>
<<a href="#" class="a6">已到头条</a> <%rs2.move(2)%><a href="newsshow.asp?showid=<%=rs2("id")%>" class="a6">下一条</a>
<%
end if%>
<%
exit do
end if
rs2.movenext
loop
end if
rs2.close
set rs2=nothing
%>