Questo è il codice completo:
codice:
<%@ LANGUAGE="VBSCRIPT" %>
<% Option Explicit %>
<% Response.Buffer=true %>
<% Server.ScriptTimeout = 300 %>
<title></title>
<style type="text/css">
@import url("/css/style.css");
</style>
</head>
<body onload=InitializeNavigation();>
<div id="container">
<div id="container2">
<div id="header"></div>
<hr />
<div id="nav"></div>
<div id="extra"></div>
<div id="content">
</p>
<h1>...</h1>
<h2></h2>
</p>
<%
'================================================================================
'================================ CONTENUTO =====================================
'================================================================================
%>
<%
Dim IdUtente
%>
<% Call SUBConnOpen("utenti.mdb") %>
<%
Dim iPageCurrent, reccount, iPageCount, iRecordsShown, da_pag, fino_a_pag, i, cont
Const iPageSize = 12 'NUMERO RECORD PER PAGINA
Const iPageColumns = 4 'NUMERO DI COLONNE PER RIGA
If Request.QueryString("page") = "" Then
iPageCurrent = 1
Else
iPageCurrent = CInt(Request.QueryString("page"))
End If
%>
<table align="center" width="100%" class="Tabella">
<tr>
<%
StrSQL1 = "SELECT * FROM TabA WHERE Stato = 1 ORDER BY DataCreazione ASC;"
Set ObjRS1 = Server.CreateObject("ADODB.Recordset")
ObjRS1.PageSize = iPageSize
ObjRS1.CacheSize = iPageSize
ObjRS1.Open StrSQL1, ObjConn, 3, 1, &H0001 'adOpenStatic, adLockReadOnly, adCmdText
reccount = ObjRS1.RecordCount
iPageCount = ObjRS1.PageCount
If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
If iPageCurrent < 1 Then iPageCurrent = 1
If iPageCount = 0 Then
SUBErrori(Err_CatVuote)
Else
ObjRS1.AbsolutePage = iPageCurrent
iRecordsShown = 0
Cont = 1
Do While iRecordsShown < iPageSize And Not ObjRS1.EOF
IdUtente = ObjRS1("IdUtenteCreatore")
If (((Cont - 1) Mod iPageColumns = 0) AND Cont <> 1) Then Response.Write("</tr><tr valign=""top"">")
%>
<td>
<table width="100%" align="center" class="Tabella">
<tr>
<td>
"><%=ObjRS1("Nome")%>
</td>
</tr>
<tr><td align="center">
<%
Set ObjRS2 = Server.CreateObject("ADODB.Recordset")
StrSQL2 = "SELECT * FROM DatiUtenti WHERE IdUtente = "&IdUtente
'response.Write(strsql1)
'response.End()
ObjRS2.Open StrSQL2, ObjConn, 3, 3
If Not ObjRS2.EOF Then
Response.Write("Aperto da: "&ObjRS2("NomeUtente")&"
")
Response.Write(""&FUNConvertiIdNazione(ObjRS2("IdNazione"))&"")
Else
response.Write("errr")
End If
ObjRS2.Close
Set ObjRS2 = Nothing
%>
</td></tr>
</table>
</td>
<%
Cont = Cont + 1
iRecordsShown = iRecordsShown + 1
ObjRS1.MoveNext
Loop
End If
ObjRS1.Close
Set ObjRS1 = Nothing
Call SUBConnClose()
%>
</tr>
</table>
<% '====================VISUALIZZA PAGINE ===================== %>
</p>
<table width="100%" align="center">
<tr>
<td align="center">Pag. <%=iPageCurrent%> <%= Paginazione_di %> <%=iPageCount%></font></td>
</tr>
<tr>
<td align="center" valign="middle">
<%If iPageCurrent-2 > 0 And iPageCurrent > 2 Then%>
">[img]/images/layout/prima.gif[/img]" border="0">
<%End If%>
<%If iPageCurrent > 1 Then%>
">[img]/images/layout/precedente.gif[/img]" border="0">
<%End If%>
<%If iPageCount > 2 Then
If iPageCurrent-2 < 1 Then da_pag = 1 Else da_pag = iPageCurrent-2
If iPageCurrent+2 > iPageCount Then fino_a_pag = iPageCount Else fino_a_pag = iPageCurrent+2
Else da_pag = 1
fino_a_pag = iPageCount
End If%>
<%For i = da_pag To fino_a_pag%>
<%If i = iPageCurrent Then%>
<font color="red"><%=i%></font>
<%Else %>
" title="Pag. <%=i%>"><%=i%>
<%End If%>
<%Next%>
<%If iPageCurrent > 0 And iPageCurrent < iPageCount Then%>
">[img]/images/layout/successiva.gif[/img]" border="0" >
<%End If%>
<%If iPageCurrent+1 < iPageCount Then%>
">[img]/images/layout/ultima.gif[/img]" border="0">
<%End If%></font>
</td>
</tr>
</table>
<%
'================================================================================
'============================= FINE CONTENUTO ===================================
'================================================================================
%>
</div>
<div id="footer"></div>
</div>
</div>
</body>
</html>