<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <%option explicit response.expires = 0 response.expiresabsolute = Now() - 1 response.addHeader "pragma","no-cache" response.addHeader "cache-control","private" Response.CacheControl = "no-cache" dim rs dim descricao dim rs1 dim cod_categoria dim cod_subcategoria dim titulo cod_categoria = replace(request("cod_categoria"),chr(39),"") cod_subcategoria = replace(request("cod_subcategoria"),chr(39),"") titulo = replace(request("titulo"),chr(39),"") %> Disfunções da ATM - Reabilitação Oral - Dr. Victor Ferzeli
Fórum
<%if cod_categoria<>"" then%> <%end if%>
<% if cod_categoria="" then set rs=conexao.execute("SELECT (SELECT COUNT(cod_foto) FROM fotos WHERE fotos.cod_categoria=categorias.cod_categoria) as total, cod_categoria, nome FROM categorias ORDER BY nome ASC ") if rs.eof=false then %>
Selecione

<% rs.movefirst while (not rs.eof) if rs("total")>0 then %> <% end if rs.movenext wend %>
&titulo=<%=rs("nome")%>"><%=rs("nome")%> (<%=rs("total")%> Imagens)
<% rs.close end if set rs=nothing elseif cod_categoria<>"" then if cod_subcategoria="" then set rs=conexao.execute("SELECT legenda, imagem FROM fotos WHERE cod_categoria="&cod_categoria&" ORDER BY cod_foto DESC") elseif cod_subcategoria<>"" then set rs=conexao.execute("SELECT legenda, imagem FROM fotos WHERE cod_categoria="&cod_categoria&" AND cod_subcategoria="&cod_subcategoria&" ORDER BY cod_foto DESC") end if if rs.eof then response.Write("Não foi encontrada nenhuma foto.") else %>
Clique na imagem para ampliá-la.

<% rs.movefirst while (not rs.eof) %>
<%=rs("legenda")%>

<% rs.movenext wend rs.close end if set rs=nothing end if %>