<%Dim conn, Rs,RsC,rs2 n_page=request("n_page") If n_page="" Then n_page = 1 session("lnk")="lnk14" %> Projeto CEL - Casa Esperança e Liberdade para Animais Carentes

<% Call abre_conexao(galeria) StrSql = "SELECT titulo,data_hora FROM tbl_galeria WHERE id_galeria="&request("id_galeria") Set RsC = conn.execute(StrSql) StrSql="SELECT url_foto,titulo,data_hora,id_galeria,id_foto FROM tbl_foto where flg_OK=1 AND id_galeria="&request("id_galeria") Set Rs = Server.CreateObject("ADODB.Recordset") Rs.open StrSql,conn,3,1 Rs.PageSize = paginacao If cint(Rs.Recordcount) > paginacao then Rs.AbsolutePage = Cint(n_page) end if%>
<%=RsC("titulo")%>
<%if NOT Rs.eof then If cint(Rs.Recordcount) > paginacao then%> <%If Cint(n_page) > 1 then p = n_page - 1%> <%else%> <%end if%> <%If Cint(n_page) < i then p = n_page + 1%> <%else%> <%end if%>
">   <%i = 0 If Rs.Recordcount >= Rs.PageSize then For navega= 1 to Rs.PageCount If navega= Cint(n_page) Then%> <%=navega%>  <%Else%> " class="texto"><%=navega%>  <%End If i = i+1 Next end if%>   ">

<%end if%> <%i = 0 WHILE NOT RS.eof AND contador < Rs.PageSize img = server.mappath("galeria/"&Rs("id_galeria")&"/"&Rs("url_foto")) if gfxSpex(img, w, h, c, strType) = true then w = w h = h end if i = i+1%> <%If i MOD 3 = 0 then%> <%end if contador = contador+1 Rs.MoveNext Wend%>
','galeria',1,<%=w+20%>,500);">/<%=Rs("url_foto")%>" width="194" height="146" border="0">
','galeria',1,<%=w+20%>,500);" class="texto"><%=Rs("titulo")%>
<%If cint(Rs.Recordcount) > paginacao then%>
<%If Cint(n_page) > 1 then p = n_page - 1%> <%else%> <%end if%> <%If Cint(n_page) < i then p = n_page + 1%> <%else%> <%end if%>
">   <%i = 0 If Rs.Recordcount >= Rs.PageSize then For navega= 1 to Rs.PageCount If navega= Cint(n_page) Then%> <%=navega%>  <%Else%> " class="texto"><%=navega%>  <%End If i = i+1 Next end if%>   ">
<%end if%>
<%else%> Infelizmente não foi localizado nenhuma foto na galeria selecionada. <%end if%>
« voltar
<%call fecha_conexao Set RsC = nothing Set Rs = nothing%>