<%
if ClassID="" then
sql="select * from product order by Stock"
else
sql="select * from product where Class like '"&ClassID&"%' order by Stock"
end if
set rec= Server.CreateObject("adodb.recordset")
rec.open sql,conn,1,1
if not rec.eof then
rec.pagesize=12
iCount=rec.RecordCount '記錄總數(shù)
iPageSize=rec.PageSize
maxpage=rec.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rec.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
else
response.Write(" 沒(méi)有找到相關(guān)案例")
end if%>
<%i=1
while not rec.eof and i<=3%>
<%if not rec.eof then%>
<%rec.movenext
end if%>
|
<%if not rec.eof then%>
<%rec.movenext
end if%> |
<%if not rec.eof then%>
<%rec.movenext
end if%> |
<%if not rec.eof then%>
<%rec.movenext
end if%> |
<%
i=i+1
wend%>
<%
call PageControl(iCount,pagecount,page,table_style,font_style)
%>
|