<% start_rec=request.querystring("start_rec") current_page=request.querystring("current_page") Set Rs1=Server.CreateObject("ADODB.Recordset") Rs1.ActiveConnection = CONNECTION_STRING Rs1.Source = "SELECT * FROM (bando INNER JOIN tipologia_bando ON bando.id_tip=tipologia_bando.id_tip) WHERE (bando.oggetto<>'') AND (bando.id_mat<>27) ORDER BY term_part_data DESC;" Rs1.CursorType = 0 Rs1.CursorLocation = 2 Rs1.LockType = 1 Rs1.Open() If not rs1.eof=true then If start_rec="" then start_rec=1 current_page=1 end if rec_for_page = 5 num_rec = 1 pos = 1 Do while not rs1.eof num_rec=num_rec+1 rs1.movenext loop rs1.movefirst tot_page=num_rec / rec_for_page end if %> <%If rs1.eof then%>

Nessun bando in memoria

<% else do while not rs1.eof if (pos>=cint(start_rec)) AND (pos <%If rs.eof then%> <%id_ban=rs1("id_ban")%> <% else %> <% end if %> <%end if%> <% pos=pos+1 %>
<% if rs1("term_part_data") <>"" then %> SALERNO, <%=rs1("data_pubb")%> - SCADENZA: <%=rs1("term_part_data")%> <% else %>   <% end if %>
TITOLO: <%=ucase(rs1("titolo"))%>
OGGETTO: <%=ucase(rs1("oggetto"))%>
NESSUN ALLEGATO PRESENTE
ALLEGATI: <% do while not rs.eof %> - "><%=rs("sourcefilename")%> <% rs.movenext loop %>

<% rs1.movenext loop %> <%end if%> <% rs1.close() set rs1=nothing %>
<% if (cint(start_rec)>rec_for_page) then %> INDIETRO <%end if%> <%If cint(tot_page)<>0 then%>   Pagina <%=current_page%> di <%=formatnumber(tot_page,0)%>  <%end if%> <%if cint(start_rec+rec_for_page) AVANTI <%end if%>