<% 'From menu sql = "select * from investors ORDER BY inv_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) 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("inv_picture")) > 0 then %>
<% if( rs("inv_pictureX") > 80 ) then xx = 80 yy = rs("inv_pictureY") * xx / rs("inv_pictureX") else xx = rs("inv_pictureX") yy = rs("inv_pictureY") end if response.write "" %>
<% end if %> <%if a > 3 then%> <%end if%> <%=rs("inv_head")%>
<%=rs("inv_preview")%>

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