<% ct_id = request("ct_id") %>
 
<% 'From menu sql = "select * from lifestyle where ct_id = "& ct_id &" ORDER BY ls_id DESC" set rs = conn.execute(sql) overall = rs.recordcount if not rs.eof then if request("no") ="" then pageno =1 else pageno=request("no") end if total = rs.recordcount pagesize= 20 totalpage = total\pagesize if (total mod pagesize) <> "0" then totalpage= totalpage+1 else totalpage = 0 end if rs.Move pagesize*(pageno-1) a=1 if trim(pageno) <> trim(totalpage) then endrecord = pagesize else endrecord=(total mod pagesize) end if For a=1 to endrecord %> <% rs.movenext next set rs = nothing end if %>
<% 'แสดงรูป 3 ข่าวแรก if len( rs("ls_picture")) > 0 then %>
<% if( rs("ls_pictureX") > 80 ) then xx = 80 yy = rs("ls_pictureY") * xx / rs("ls_pictureX") else xx = rs("ls_pictureX") yy = rs("ls_pictureY") end if response.write "" %>
<% end if %> <%=rs("ls_head")%>
<%=rs("ls_preview")%>

 Found : <%=overall%> item(s)
<%for ppp = 1 to totalpage%> <%=ppp%>  <%next%>