<%
'Apertura recorset
Set rsNews = Server.CreateObject("ADODB.Recordset")
strSQL_New = "SELECT * FROM xxx ORDER by ID_CONTATORE desc"
Set rsNews = conn.Execute(strSQL_New)
sHtml1 = "<FONT face='verdana' SIZE='1' COLOR='Black'>"
sHtml2 = "<A HREF='dettagli_a.asp?Id_contatore="
sHtml3 = "'>"
sHtml4 = "</A></FONT>
"
sTxt = ""
'Verifica recordset
If rsNews.EOF Then
Response.Write "<center><FONT Face='Arial' SIZE='1'>Non ci sono nuove Auto</font></center>"
Else
rsNews.movefirst
'Mostra le prime 5 News
i=0
do until i=15 or rsNews.EOF
i=i+1
'visualizzione records news
sTxt = sTxt & sHtml1 & rsNews("xxx") & rsNews("xxxx") & sHtml2 & _
rsNews("ID_CONTATORE") & sHtml3 &"
"& "<img src=thumbnailss.aspx?filename="& rsNews("foto") &"&w200 />" &sHtml4
rsNews.movenext
Loop
'Setto i valori della tabella velocita larghezza altezza
iSpeed = 0
iTop = 0
iLeft = 0
iWidth = 244
iHeight = 360
sMarquee="<MARQUEE onmouseover='this.stop();' " & _
"onmouseout='this.start();'direction='up' scrollamount='1' " & _
"scrolldelay='" & iSpeed & "' Top='" & iTop & "' left='" & iLeft & _
"' width='" & iWidth & "' height='" & iHeight & "'>" & sTxt & "</MARQUEE>"
End IF
'visualizzo il tutto
Response.Write "<table border='0' width='8%' height='1' cellspacing='0' cellpadding='0'>"
' Response.Write "<tr><td width='100%' height='1' bgcolor='#98A0B8'>[img]immagini/News.gif[/img]"
Response.Write "</td></tr><tr><td width='100%' height='1' align='center' bgcolor='#912729'>"& sMarquee & "</td></tr></table>"
'distruggo il recorset
rsNews.Close
Set rsNews = Nothing
%>