il coduce dovrebbe essere questo:
QUESTO E' RELATIVO AL FILE mrgbook.asp
<%
'#################################################################################
'## Mr. GUESTBOOK v1.0
'## Copyright (C) 2003 - MrWebmaster (
www.mrwebmaster.it)
'## Questo script è liberamente utilizzabile, ma sono vietate:
'## 1) la modifica;
'## 2) l'alterazione;
'## 3) la distribuzione a scopo di lucro.
'##
'## E' soprattutto vietata la rimozione dei nostri credits a fondo pagina.
'## Ogni violazione potrà essere perseguita a norma di legge.
'#################################################################################
%>
<!--#include file="config.asp"-->
<%
querysql="select * from GUESTBOOK ORDER BY id DESC"
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(path)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open querysql, conn, 3, 3
currentPage = request.queryString ("pag")
If currentPage = "" then
currentPage = "1"
End If
pageSize = ncommenti
Records = rs.RecordCount
if NOT (Records = 0) then
rs.pageSize = pageSize
rs.AbsolutePage = currentPage
End If
pageNext = currentPage + 1
pagePrev = currentPage - 1
Pages = Records \ pageSize
if Records mod pageSize then
Pages = Pages + 1
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title><%=titolo%></title>
<style>
A {color:FFFFFF; text-decoration: none}
A:hover {color: FFFFFF; text-decoration: underline}
A.black {color:000000; text-decoration: none}
A.black:hover {color:000000; text-decoration: underline}
.1 {font-family:<%=font%>; font-style:normal; font-size:11px}
.2 {font-family:<%=font%>; font-style:normal; font-size:13px}
</style>
<script language="Javascript">
function openwin(ind,nome) {
var features = 'width=240,height=80,toolbar=no,resizable=no,menubar=no,location=no,status=yes,scrollbars=no';
window.open(ind,nome,features);
}
</script>
</head>
<body bgcolor="<%=bgcolor%>">
<!--#include file="header.asp"-->
<br>
<div align="center">
<table border="0" cellpadding="2" cellspacing="0" width="98%">
<tr><td class="2"><big><%=titolo%></big></td></tr>
<tr><td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="50%" class="2"><a href="<%=homepageurl%>" class="black"><u>HomePage</u></a> + Guestbook</td>
<td width="50%" align="right" class="2"><a href="scrivi_commento.asp" class="black"><u><b>Lascia il tuo commento!</b></u></a></td>
</table>
</td></tr>
<tr><td><hr></td></tr>
<%
if NOT (CInt(Records) = 0) then 'if there are no records in the database it doesn't go on dysplaying then and only sais that there are no records
Do While (Not rs.EOF) and (currentRecords < pageSize) 'runs through the records and dysplays them
currentRecords = currentRecords + 1 'counts currently dysplayed records
%>
<tr><td bgcolor="#333333" class="1"><font color="#FFFFFF">Commento scritto da: <a href="#" OnClick="openwin('dati_autore.asp?id=<%=rs("id")%>','autore')"><b><u><%=rs("nome")%></u></b></a><br>
Scritto il: <b><%=rs("data")%></b> Ip: <b><%=rs("ip_address")%></b></font></td></tr>
<tr><td bgcolor="#CCCCCC" class="1"><%=rs("commento")%></td></tr>
<tr><td> </td></tr>
<%
rs.MoveNext
Loop
else
response.write ("<tr><td class=2>Non è stato scritto nessun commento nel guestbook!!<br><a href=scrivi_commento.asp?act=write><b><u>SRCRIVI IL TUO COMMENTO!!</u></b></a></td></tr>") & VBCRLF
End If
%>
<tr><td><hr></td></tr>
<tr><td align=center class="2"><b><% if NOT pagePrev < 1 then %><a href="mrgbook.asp?pag=<% = pagePrev %>" class="black"><b><u>« indietro</u></b></a><% else %>« indietro<% End If %> | <% While NOT pageNumber = Pages pageNumber = pageNumber + 1 %> <% if CInt (pageNumber) = CInt (currentPage) then %> <font color="#FF0000"><% = pageNumber %></font> | <% else %> <a href="mrgbook.asp?pag=<% = pageNumber %>" class="black"><u><% = pageNumber %></u></a> | <% End If %> <% Wend %> <% if NOT pages < pageNext then %> <a href="mrgbook.asp?pag=<% = pageNext %>" class="black"><u>avanti »</u></a> <% else %>avanti »<% End If %> </b></td></tr>
<tr><td height=3></td></tr>
<tr><td align=center class="1">Ci sono <font color="#FF0000"><b><% = Records %></b></font> commenti nel guestbook!</td></tr>
</table>
</div>
<br>
<center>
<div align="center">
<table>
<tr><td class="2"><a href="https://www.mrw.it" target="_blank"><img border="0" src="logo_mrgbook.gif" width="88" height="31" alt="Mr. Webmaster" hspace="4" align="left"></a>
<b>Mr. Guestbook</b> è uno script gratuito realizzato da <a href="https://www.mrw.it" target="_blank" class="black"><u>Mr. Webmaster</u></a><br>
Il portale italiano di risorse gratuite per Webmaster!</td></tr>
</table>
</div>
</center>
</body>
</html>
<%
rs.close
conn.close
%>