<% pageno = Request.QueryString ("pg") if Request.QueryString ("selectcat") = "" then cats = Request.Form ("selectcat") else cats = Request.QueryString ("selectcat") end if list = Request.QueryString ("list") categoryname = Request.Form ("txtcategoryname") quant = 1 %>
<%=Label(93)%>
<%varIP=session("orderid")%> <% if pageno= "" then pageno = 1 set rs = server.CreateObject ("ADODB.RecordSet") if cats = "" then sql= "Select * from product where ProStatus = 1 order by PID desc" rs.CursorLocation = 3 rs.Open sql,con,1,3,1 else sql= "Select * from product,category where product.categoryid = "&cats&" and product.categoryid = category.categoryid and ProStatus = 1 order by PID desc" rs.CursorLocation = 3 rs.Open sql,con,1,3,1 end if 'end if if rs.RecordCount > 0 then pagelen = 25 nrecord = rs.recordcount rs.pagesize = pagelen totalpage = rs.pagecount rs.absolutepage = pageno %>
<% recno=1 ccount = 0 Do while not rs.eof and recno <= pagelen frmname = "frmshop"&frm %> <% rs.movenext if ccolor = "#ffffff" then ccolor = "#E7EDF0" else ccolor = "#ffffff" end if frm = frm + 1 recno=recno+1 loop rs.Close set rs = nothing %>
<%=Label(94)%>  <%=rs.RecordCount%> <%=Label(95)%> <% if cats ="" then %>  <%=Label(71)%> <%else %>  <%=rs.Fields ("category")%> <% end if %>
<%=Label(92)%>
<%=Label(4)%>
<%=Label(5)%> (<%=Label(75)%>)
<%=rs.fields("proID")%>
<%if rs.fields("ProPrice2") <> 0 then %> <% Response.Write(FormatNumber(rs.fields("ProPrice2")))%> <%else%> <% Response.Write(FormatNumber(rs.fields("ProPrice1")))%> <% End if %>
<% end if%> <%if totalpage > 1 then ' if page count แสดงหน้า%>

<%=Label(69)%>  <% For idx= 1 to totalpage if idx=cint(pageno) then ' if link หน้าปัจจุบัน%> <%=idx%> <%Else %> <%=idx%> <% End if ' end link หน้าปัจจุบัน%> <%Next %>

<%end if ' end page count แสดงหน้า%>