<%
'下一页
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
Lankecms_next = "没有下一条"
Lankecms_enext = "No next"
else
a2=newrs("id")
next_title= left(newrs("title"),20)
next_etitle= left(newrs("etitle"),40)
Lankecms_next = "下一条：<a href='"&a2&".html' title='"&next_title&"'>"&next_title&"</a>"
Lankecms_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
Lankecms_prev = "没有上一条"
Lankecms_eprev = "No previous"
else
a0=headrs("id")
prev_title=left(headrs("title"),20)
prev_etitle=left(headrs("etitle"),40)
Lankecms_prev = "上一条：<a href='"&a0&".html' title='"&prev_title&"'>"&prev_title&"</a>"
Lankecms_eprev = "PREVIOUS：<a href='"&a0&".html' title='"&prev_etitle&"'>"&prev_etitle&"</a>"
end if
%>