<%
RecordsPerPagina = 10
RecordsPerRiga = 1
page = Request("page")
if page="" then page=1
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath ("../dati/data.mdb")
sql = "SELECT * FROM CATALOGO2 WHERE TIPO = 'NEWS' ORDER BY IDCATALOGO2 DESC"
rs.open sql, conn, 1, 3
If rs.Eof=True or rs.Bof=True then
%>
Al momento non ci sono news o promozioni in corso!
<%
Else
rs.PageSize = RecordsPerPagina
rs.AbsolutePage = page
%>
<%
j=0
For i=1 to RecordsPerPagina
if j>=RecordsPerRiga then
j=1
%>
<%
else
j=j+1
end if
if Not rs.EOF then
%>
<%=rs("TITOLO")%>
<%=rs("DESCRIZIONE")%> |
<%Set conn = Server.CreateObject("ADODB.Connection")
Set rs1 = Server.CreateObject("ADODB.Recordset")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath ("../dati/data.mdb")
sql = "SELECT IMMAGINE FROM IMMAGINI where IDCATALOGO=" & rs("IDCATALOGO2")
rs1.open sql, conn
If rs1.Eof=True or rs1.Bof=True then
%>
Non ci sono immagini!
<%
Else
while not rs1.eof%>
')"> " width="120" height="90" border="0" />
<%rs1.movenext
wend
end if%>
|
|
|
 |
<%
rs.MoveNext
end if
if j>=RecordsPerRiga then
%>
<%
end if
Next
%>
<% end if %>
|