|
PREGUNTAS Y
RESPUESTAS - FORO DE AYUDA GENERAL
Haz click sobre el título del mensaje para ver las
preguntas y las respuestas de
nuestros asesores.
<%
Dim oConn, RS, mostrar, pag_totales, pag_actual
Set oConn = Server.CreateObject ("ADODB.Connection")
Set RS = Server.CreateObject ("ADODB.RecordSet")
oConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="&Server.MapPath("./foro.mdb")
sql = "SELECT * FROM discusion WHERE IdCabeza=0 ORDER BY Fecha DESC"
RS.Open sql, oConn,3,1
mostrar = 20
rs.PageSize = mostrar
rs.CacheSize = mostrar
if Request.Querystring("pagina")="" then
pag_actual=1
else
pag_actual=CInt(Request.Querystring("pagina"))
end if
pag_totales = rs.PageCount
if pag_actual < 1 then
pag_actual = 1
end if
if pag_actual > pag_totales then
pag_actual = pag_totales
end if
if pag_totales=0 then
Response.Write("No hay mensajes en el foro.")
else
rs.AbsolutePage = pag_actual
Response.Write ""
Response.Write("Página " & Pag_actual & " de " & pag_totales &"
")
cant_registros = 0
Response.Write " | "
if pag_actual > 1 then
Response.Write("Mensajes anteriores ")
end if
if pag_actual < pag_totales then
Response.Write("Mensajes más viejos
")
end if%>
|
| Título del Mensaje |
Respuestas |
Fecha |
<%do while not rs.EOF and cant_registros < mostrar
fecha = RS("Fecha")%>
"><%=(RS.Fields("Titulo"))%> |
<% Response.Write " ["&RS("Respuestas")&"] | " &Day(fecha)&"/"&Month(fecha)&"
| "
cant_registros = cant_registros +1
RS.MoveNext
Loop
end if
RS.Close
oConn.Close
Set RS = nothing
Set oConn = nothing
%>
|