Salve, gente volevo sapere dove posso aggiungere le scritte "avanti ed indietro " di questa paginazione:
codice:<% call Header %> <p align="center"><font size="4" face="Verdana">Messaggi GuestBook</font></p> <% ' NUMERO DI MESSAGGI PER PAGINA iPageSize = 5 If Request.QueryString("page") = "" Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("page")) End If If Request.QueryString("order") = "" Then strOrderBy = "id" Else strOrderBy = Request.QueryString("order") End If ' PERCORSO DEL DATABASE Set Conn = Server.CreateObject("ADODB.Connection") conn.Open url_DB Set RS = Server.CreateObject("ADODB.Recordset") ' FA LA RICHIESTA AL DATABASE sql = "SELECT * FROM GuestBook_Messaggi ORDER BY " & strOrderBy &" DESC;" RS.Open sql, conn, adOpenKeyset RS.PageSize = iPageSize RS.CacheSize = iPageSize iPageCount = RS.PageCount If iPageCurrent > iPageCount Then iPageCurrent = iPageCount If iPageCurrent < 1 Then iPageCurrent = 1 ' NESSUN MESSAGGIO INSERITO -> VIENE VISUALIZZATO UN MESSAGGIO CHE INFORMA CHE NON E' PRESENTE ' NEMMENO UN MESSAGGIO NEL GUESTBOOK If iPageCount = 0 Then %><hr> <p align="center"><font size="2" face="Verdana">Nessun messaggio inserito nel guestbook!</font></p> <hr> <% Else RS.AbsolutePage = iPageCurrent iRecordsShown = 0 ' SE I MESSAGGI SONO PRESENTI NEL GUESTBOOK, LI MOSTRA Do While iRecordsShown < iPageSize And Not RS.EOF %> <table border="0" cellpadding="0" cellspacing="0" width="100%" > <tr> <td width="28%"><font face="Verdana" size="2">Titolo Commento:</font></td> <td width="72%"><font face="Verdana" size="2"><%=RS("titolo")%></font></td> </tr> <tr> <td width="28%"><font face="Verdana" size="2">Commento:</font></td> <td width="72%"><font face="Verdana" size="2"><%=RS("messaggio")%></font></td> </tr> <tr> <td width="28%"><font face="Verdana" size="2">Autore:</font></td> <td width="72%"><font face="Verdana" size="2">"><%=RS("autore")%></font></td> </tr> <tr> <td width="28%"><font face="Verdana" size="2">Data inserimento:</font></td> <td width="72%"><font face="Verdana" size="2"><%=RS("data")%></font></td> </tr> </table> <hr> <% ' COMPLETA LA VISUALIZZAZIONE DEI MESSAGGI E CHIUDE LA CONNESSIONE ' AL DATABASE iRecordsShown = iRecordsShown + 1 RS.MoveNext Loop End If RS.Close Set RS = Nothing Conn.Close %><center> <% ' MOSTRA IL NUMERO DELLE PAGINE ' DATO CHE VERRANNO MOSTRATI ' IN QUESTO ESEMPIO 5 MESSAGGI PER PAGINA For x=1 to iPageCount %> <font face="Verdana" size="2">[ <%=x%> ]</font> <% next %> <p align="center"><font size="2" face="Verdana">Inserisci messaggio</font></p> <% call Footer %>

Rispondi quotando
