<% page = trim(request.querystring("page")) Dim strLine If page = "" Then page = 1 else page = cint(page) End If DisplayNum = 0 Set oCon = Server.CreateObject ("ADODB.Connection") Set Rec = Server.CreateObject ("ADODB.Recordset") oCon.Open strCon Rec.PageSize = 5 Rec.CursorLocation = adUseClient sql = "Select newsID, headline, source, summary, newsDate from news where status = 1 order by newsDate desc" Rec.Open sql, oCon if Rec.EOF OR Rec.BOF Then response.write "

" response.write "

Nessuna news disponibile ...

" else ipage = Rec.PageCount if page = 0 or page > ipage Then Rec.AbsolutePage = ipage else Rec.AbsolutePage = page end if do while not Rec.Eof AND i < 5 response.write "" response.write "
" response.write "" & Rec("headline") & "
" ' response.write "
Data : " & Rec("newsDate") & "   Fonte : "& rec("source") &"
"& vbcrlf response.write "" response.write Rec("summary") & "

"& vbcrlf & vbcrlf & vbcrlf i = i + 1 Rec.Movenext loop response.write ""& vbcrlf If ipage > 1 Then showpages = "
Altre pagine :  " For z = 1 to ipage If z = page then showpages = showpages & "  [" & page & "]  " Else showpages = showpages & " " & z & "" & "  " End If Next response.write showpages & "  " End If if ipage > 1 And page > 1 Then response.write "Precedente" end if response.write "  " If ipage > 1 And page < ipage Then response.write "Successivo" end if response.write "
" Rec.Close oCon.Close set Rec = nothing set oCon = nothing End if %>
La Bottega s.n.c.- Via Porrettana 298 - Sasso Marconi (Bo) Tel 051.84.11.43 - Fax 051.67.56.448

- SITO CREATO DA STUDIO R4 -