<% Set rs2 = Server.CreateObject("ADODB.Recordset") sql = "SELECT * FROM file" sql = sql & " WHERE file.file_progre = " & request.QueryString("file") rs2.open sql, cnt, 3, 3 if rs2.recordcount > 0 then progressivo_news = rs2.fields("file_oripro") end if rs2.close file_precedente = 0 file_successivo = 0 foto_attuale = 0 foto_totali = 0 trovato = false Set rs2 = Server.CreateObject("ADODB.Recordset") sql = "SELECT * FROM file" sql = sql & " WHERE file.file_oripro = " & NumeroPerDatabase(progressivo_news) sql = sql & " AND file.file_oritab = " & TestoPerDatabase(tabella_news) sql = sql & " ORDER BY file.file_primar DESC, file.file_numero" rs2.open sql, cnt, 3, 3 if rs2.recordcount > 0 then rs2.movefirst foto_totali = rs2.recordcount do while not rs2.eof if trovato = true then file_successivo = rs2.fields("file_progre") exit do else foto_attuale = foto_attuale + 1 end if if trim(request.QueryString("file")) = trim(rs2.fields("file_progre")) then trovato = true else file_precedente = rs2.fields("file_progre") end if rs2.movenext loop end if rs2.close%>
<%if file_precedente <> 0 then%> Foto Precedente<%else%> <%end if%> Foto <%=foto_attuale%> di <%=foto_totali%> <%if file_successivo <> 0 then%>Foto Successiva <%else%> <%end if%>
<% Set rs2 = Server.CreateObject("ADODB.Recordset") sql = "SELECT * FROM file" sql = sql & " WHERE file.file_progre = " & request.QueryString("file") rs2.open sql, cnt, 3, 3 if rs2.recordcount > 0 then%> &MaxWidth=583" alt="" border="0"><% end if rs2.close%>
<% set rs = Server.CreateObject("ADODB.Recordset") sql = "SELECT file.* FROM file" sql = sql & " WHERE file.file_oripro = " & NumeroPerDatabase(progressivo_news) sql = sql & " AND file.file_oritab = " & TestoPerDatabase(tabella_news) sql = sql & " ORDER BY file.file_primar DESC, file.file_numero" rs.open sql, cnt, 3, 3 if rs.recordcount > 0 then do while not rs.EOF%> ">&MinWidth=100&MinHeight=80&MaxWidth=100&MaxHeight=80&CutWidth=100&CutHeight=80" alt="" border="0" style="margin:0.4em"><% rs.movenext loop end if rs.close%>