<%
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
<%
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
%>
|