<% Response.Expires =-1500 ' if (len(session("id_utente"))<2) then ' Response.Redirect ("/avvisi/session_scaduta.htm") ' end if idUtente = session("id_utente") 'tipo=session("tipo") %> Archivio
<% sezione = trim(request.querystring("id_sezione")) if sezione = "" then tipo=trim(request.querystring("id_tipo")) if tipo="" then condizione = "where pagina=1 and id_gestione=0" else condizione = "where id_tipo="&tipo&" and pagina = 1 and id_gestione=0" end if else sql = "select id_tipo from tipologia_notizie where id_sezione="&sezione&"" set rs=conn.execute(sql) strTipo = "" do while not rs.eof strTipo = strTipo & rs("id_tipo")&"," rs.movenext loop rs.close set rs=nothing strTipo = left(trim(strTipo),len(trim(strTipo))-1) condizione = "where id_tipo in ("&strTipo&") and pagina = 1 and id_gestione=0" end if pag = request.querystring("pag") if len(pag)=0 then pag=1 end if nperpag = 10 sql="select count(id_notizia)as conta from notizie "&condizione&" order by data Desc" Set rs=Conn.Execute (sql) if not rs.eof then ntot = rs("conta") end if rs.close set rs=nothing %>
<% sql="select * from notizie "&condizione&" order by data desc" 'response.write sql set rs=conn.execute(sql) if not rs.eof then conta2=0 'il move() non funziona con mysql Do while conta2"&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) conta = conta + 1 rs.movenext loop response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(""&vbcrlf) response.write(" "&vbcrlf) else response.write("") response.write("") response.write("") end if rs.close set rs=nothing %>
 
"&FormatData(rs("data"))&" "&rs("ora")&":"&right("0"&rs("min"),2)&" "&rs("titolo")&"
 
"&rs("anteprima")&""&left(rs("testo"),200)&"... [Continua]"&vbcrlf) response.write("
 
 
 "&vbcrlf) if pag>1 then Response.Write("Prev."&vbcrlf) end if indice = 0 do while cint(indice*nperpag) < cint(ntot) Response.Write("  "&indice+1&"  "&vbcrlf) indice = indice + 1 loop if cint(pag*nperpag) < cint(ntot) then Response.Write("Next"&vbcrlf) end if response.write("
NON CI SONO NOTIZIE
 
<% if len(""&tipo)>1 then %> <% else%> <% end if%>
Indietro 
<% %>