<%
Set cn = Server.CreateObject("ADODB.Connection")
%><%
Set rs = Server.CreateObject("ADODB.Recordset")
strSQL="SELECT * FROM QArgomento WHERE IDCategoria = " & request.querystring("ID") & " ORDER BY Data Desc"
rs.Open strSQL,cn
Set objID=rs("ID")
Set objArgomento=rs("Argomento")
Set objData=rs("Data")
Set objNick=rs("Nick")
Set objnRisp=rs("nRisp")
if rs.EOF then
response.write("<h3>Spiacente, non e' stata fatta nessuna richiesta per questo argomento.</h3>")
else
dim pari 'booleano per identificare se siamo in una riga pari o in una dispari
pari = false
%>
<table width="100%" cellpadding="1" >
<tr align="left">
<td class="Testata">Messaggio</td>
<td class="Testata" align="center">Proposto da</td>
<td class="Testata" align="center"><font size="-1">Ultimo
aggiornamento</font></td>
<td class="Testata" align="center"><font size="-1">N° Risposte</font></td>
</tr>
<%
Do Until rs.EOF
if pari then
%>
<tr class="rigapari">
<%else%>
<tr class="rigadispari">
<%end if%>
<td>
&ID=<%=objID%>&argomento=<%=replace(objArgoment o," ","%20")%>"><%=objArgomento%></td>
<td align="center"><%=objNick%></td>
<td align="center"><%= objData%></td>
<td align="center"><%= objnRisp-1%></td>
</tr>
<%
pari = not pari ' inverto il valore della variabile booleana
rs.movenext
loop
%>
</table>
<% end if
Set cn = nothing
Set rs = nothing
%>