<% Dim oConn Dim oRS Dim sSQL Dim strBanner Dim strUrlSitoClick lingua = Request.Querystring("lingua") Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("mdb-database\guestbook.mdb")) %>
<%If lingua="it" Then%>
GUESTBOOK
Inserisci Messaggio <%else%> Sign this Guestbook <%end if%>  

<% 'Paginazione pag = TRIM(Request.QueryString("pag")) If pag="" Then pag = 1 Else pag = CInt(pag) End If 'Fine paginazione sSQL = "SELECT * FROM messaggi order by id_contatore desc" 'Set oRS = oConn.Execute(sSQL) Set oRS = Server.CreateObject("ADODB.Recordset") 'Settiamo il numero di record per pagina oRS.PageSize = 5 oRS.Open sSQL, oConn, 3, 3 If oRS.EOF=True or oRS.BOF=True Then %>
Non ci sono Messaggi
<% else oRS.AbsolutePage = pag If lingua="it" Then ' Italiano For i=1 to oRS.PageSize %>
Nome: <%=oRS("nome").Value%>
Data: <%=oRS("data").Value%>
E Mail: <%=oRS("e_mail").Value%>
Home Page: "><%=oRS("url_sito").Value%>
Messaggio:
<%=oRS("messaggio").Value%>

<% oRS.MoveNext If oRS.EOF Then Exit For Next else ' Inglese For i=1 to oRS.PageSize %>
Name: <%=oRS("nome").Value%>
Time: <%=oRS("data").Value%>
E Mail: <%=oRS("e_mail").Value%>
Home Page: "><%=oRS("url_sito").Value%>
Comments:
<%=oRS("messaggio").Value%>

<% oRS.MoveNext If oRS.EOF Then Exit For Next end if Response.Write("") Response.Write("") 'Prepariamo i link per le altre pagine della lista Response.Write("
") If ( pag > 1 and ordina = 8 and lingua ="it") Then Response.Write("
Pagina precedente

") elseif ( pag > 1) Then Response.Write("
Previous

") End If Response.Write("
") if ( pag < oRS.PageCount and lingua ="it") Then Response.Write("
Pagina successiva

") elseif ( pag < oRS.PageCount ) Then Response.Write("
Next

") End If Response.Write("
") End If oRS.Close Set oRS = Nothing oConn.Close Set oConn = Nothing %>