<%Option Explicit%>
<!--#include file=conn.asp-->
<%
	Dim mainid
	mainid=request.querystring("id")
	If mainid="" or (not Isnumeric(mainid)) then
		response.redirect "default.asp"
	Else
		If request("action")="next" Then
			set rs=Conn.execute("select top 1 id from Data where (id>"&mainid&" and SubMainNumber=0) order by id")
		Else
			Set rs=Conn.execute("select top 1 id from Data where (id<"&mainid&" and SubMainNumber=0) order by id desc")
		End If
		If rs.eof and rs.bof Then 
			DoWhat="快速跳页中止"
			WhatErr="<LI>已经达到页首或页尾！</LI>"
			call HeadHtml()		'网页头函数
			call FounderErr()	'调用信息函数
			call FootHtml()		'网页尾函数
		Else
			response.redirect "dis.asp?id="&rs(0)
		End If
	End If
%>