|
|
<%catalogid=request("catalogid")
type_id=request("type_id")
sql="select c.catalogid as cid,c.*,t.* from t_business_catalog c,t_business_product_1 t where c.catalogid=t.catalogid"
if catalogid<>"" then sql=sql &" and c.catalogid="&catalogid
if type_id<>"" then sql=sql&" and t.type_id="&type_id
sql=sql&" order by t.product_name asc"
'response.Write(sql)
set myrs=server.CreateObject("adodb.recordset")
myrs.open sql,conn,1,1%>
<%if myrs.recordcount<>0 then
myrs.PageSize=12'
total_page=myrs.PageCount
total_red=myrs.RecordCount
current_page=Request("pageno")
if current_page="" then
current_page=1
elseif not isnumeric(current_page) then
current_page=1
else
current_page=cint(current_page)
end if
if current_page>total_page then
current_page=total_page
elseif current_page<1 then
current_page=1
end if
myrs.AbsolutePage=current_page
%>
|
<%
pageno=clng(request("pageno"))
pagenum=myrs.PageCount
if pageno="" or pageno=0 or pageno>pagenum then
pageno=1
else
pageno=pageno
end if
showpagenum=32
response.write " First | "
if pageno>1 then
response.write " Previous "
'response.end()
end if
if pagenum>showpagenum then
num_left=pageno-1
num_right=pagenum-pageno
if num_left>(showpagenum/2) then
if num_right<(showpagenum/2) then
page_left=pageno-(showpagenum-num_right)+1
page_right=pagenum
else
page_left=pageno-(showpagenum/2)
page_right=pageno+(showpagenum/2)
end if
else
page_left=1
page_right=pageno+(showpagenum-num_left)-1
end if
for P=page_left to pageno-1
response.write " "&p&" "
next
response.write ""&pageno&" "
for f=pageno+1 to page_right
response.write " "&f&" "
next
else
for i=1 to pagenum
if i=pageno then
response.write " "&i&" "
'response.end()
else
response.write " "&i&" "
'response.end()
end if
next
end if
'??????
if pagenoNext | "
'response.end()
end if
response.write " Last "
%>
|
|
<%
pageno=clng(request("pageno"))
pagenum=myrs.PageCount
if pageno="" or pageno=0 or pageno>pagenum then
pageno=1
else
pageno=pageno
end if
showpagenum=20
response.write " First | "
if pageno>1 then
response.write " Previous "
'response.end()
end if
if pagenum>showpagenum then
num_left=pageno-1
num_right=pagenum-pageno
if num_left>(showpagenum/2) then
if num_right<(showpagenum/2) then
page_left=pageno-(showpagenum-num_right)+1
page_right=pagenum
else
page_left=pageno-(showpagenum/2)
page_right=pageno+(showpagenum/2)
end if
else
page_left=1
page_right=pageno+(showpagenum-num_left)-1
end if
for P=page_left to pageno-1
response.write " "&p&" "
next
response.write ""&pageno&" "
for f=pageno+1 to page_right
response.write " "&f&" "
next
else
for i=1 to pagenum
if i=pageno then
response.write " "&i&" "
'response.end()
else
response.write " "&i&" "
'response.end()
end if
next
end if
'??????
if pagenoNext | "
'response.end()
end if
response.write " Last "
%>
|
<%else%>
No
items are available!
Please check back later for added
items to this category. |
<%end if%>
|