

<%
fecha=trim(Request.querystring("variable1"))
usuario=trim(Request.querystring("variable2"))
hora=trim(Request.querystring("variable3"))
'hago unas cookies
response.cookies("variable1")= trim(Request.querystring("variable1"))
response.cookies("variable2")= trim(Request.querystring("variable2"))
response.cookies("variable3")= trim(Request.querystring("variable3"))
dim conexion, sql, RS, sql2
Set conexion = Server.CreateObject("ADODB.Connection")
conexion.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("base_datos.mdb"))
sql ="SELECT * FROM foro where fecha = '"&fecha&"' and usuario ='"&usuario&"' and hora = '"&hora&"'"
set RS= conexion.execute(sql)
sql2 ="SELECT * FROM fororespondido where fechaorigen ='"&request.cookies("variable1")&"' and usuarioorigen ='"&request.cookies("variable2")&"' and horaorigen ='"&request.cookies("variable3")&"'"
set RSS= conexion.execute(sql2)
do while not RS.eof%>
<TABLE align=center border=1>
<TBODY>
<TR>
<TD></TD>
<TD align=right><A href="http://127.0.0.1/Responderforo.htm">Responder</A>
<A href="http://127.0.0.1/Listaforos.asp">Lista de Foros</A></TD></tr>
<TR bgColor=#b5b5ff>
<TD align=left width=170><B><% =RS("asunto") %></B>
<P>Autor: <% =RS("usuario") %>
<P>Día: <% =RS("fecha") %> </P></TD>
<TD vAlign=top width=500><% =RS("mensaje") %></TD></FONT></TR></TBODY></TABLE>
<% RS.movenext
loop %>
<br><p>
<% do while not RSS.eof%>
<TABLE align=center border=1>
<TBODY>
<TR>
<TD></TD>
<TD align=right><A href="http://127.0.0.1/Responderforo.htm">Responder</A>
<A href="http://127.0.0.1/Listaforos.asp">Lista de Foros</A></TD></tr>
<TR bgColor=#b5b5ff>
<TD align=left width=170><B><% =RSS("asunto") %></B>
<P>Autor: <% =RSS("usuario") %>
<P>Día: <% =RSS("fecha") %> </P></TD>
<TD vAlign=top width=500><% =RSS("mensaje") %></TD></FONT></TR></TBODY></TABLE>
<% RSS.movenext
loop
conexion.close
set RS =nothing
set RSS =nothing
set conexion =nothing %>