<% set Con = server.CreateObject("adodb.connection") con.ConnectionString="DSN=news" con.Open pg = TRIM( Request( "pg" ) ) 'response.write pg &" Page " IF pg = "" THEN pg = 1 Set rs = Server.CreateObject("ADODB.Recordset") rs.ActiveConnection = Con rs.CursorType = adOpenStatic rs.PageSize = 12 sqlS = "SELECT * FROM gphoto,gheader where gphoto.gphid=gheader.ghid order by (gpid)desc" rs.open sqls if not rs.EOF then rs.AbsolutePage = pg end if %>
<%%>
<%=rs.recordcount%>  Images
<% t=1 WHILE NOT rs.EOF AND rowCount < rs.PageSize rowCount = rowCount + 1 %> <%if t=4 or t=8 then 'For breaking the TD %> <%end if%> <% rs.MoveNext t=t+1 WEND %>
/thumbnails/<%=rs("gpname")%>_t.jpg" border="0" alt="<%=rs("gptitle")%>-<%=rs("gpid")%>- Ammucare Web Photo Gallery">
<%=mid(rs("gptitle"),1,17)%>...
<% IF rs.PageCount > 1 THEN %> Go to page: <% FOR i = 1 to rs.PageCount IF i <> cINT( pg ) THEN %> <% response.write i%> <% ELSE %> <%=i%>  <% END IF %> <% NEXT %> <% END IF %>