<%
'下一页
newrs=server.CreateObject("adodb.recordset")
sql="select top 1 * from news where id>"&a1&" order by id"
set newrs=conn.execute(sql)
if newrs.eof then
Kdesign_next = "没有下一条"
Kdesign_enext = "No next"
else
a2=newrs("id")
next_title= left(newrs("title"),20)
next_etitle= left(newrs("etitle"),40)
Kdesign_next = "下一条：<a href='"&a2&".html' title='"&next_title&"'>"&next_title&"</a>"
Kdesign_enext = "NEXT：<a href='"&a2&".html' title='"&next_etitle&"'>"&next_etitle&"</a>"
end if

'上一页
headrs=server.CreateObject("adodb.recordset")
sql="select top 1 * from news where id<"&a1&" order by id desc"
set headrs=conn.execute(sql)
if headrs.eof then
Kdesign_prev = "没有上一条"
Kdesign_eprev = "No previous"
else
a0=headrs("id")
prev_title=left(headrs("title"),20)
prev_etitle=left(headrs("etitle"),40)
Kdesign_prev = "上一条：<a href='"&a0&".html' title='"&prev_title&"'>"&prev_title&"</a>"
Kdesign_eprev = "PREVIOUS：<a href='"&a0&".html' title='"&prev_etitle&"'>"&prev_etitle&"</a>"
end if
%>