%@ Language=VBScript %>
<%
dim mes
set conexion = Server.CreateObject ("ADODB.connection")
%><%
conexion.open
set registros = Server.CreateObject ("ADODB.RECORDSET")
%>
Cámara de Industriales del Estado Carabobo
<%dim totalpreguntas,totalrespuestas
sql = "select count(id) as total from ciec_foro1 where foro=10"
registros.open sql,conexion,1
totalpreguntas=registros("total")
registros.close
sql = "select count(id) as total from ciec_foro1 where foro=10 and mensaje<>''"
registros.open sql,conexion,1
totalrespuestas=registros("total")
registros.close%>
Hay <%=totalpreguntas%> preguntas publicadas y <%=totalrespuestas%> respuestas en este foro
Preguntas hechas por
empresarios, trabajadores, y sociedad civil en general:
Preguntas (Haga clic sobre las preguntas para leer las respuestas)
<%Dim mostrar, cant_paginas, pagina_actual, registro_mostrado, I
mostrar = 5
If Request.QueryString("page") = "" Then
pagina_actual = 1
Else
pagina_actual = CInt(Request.QueryString("page"))
End If
registros.PageSize = mostrar
registros.CacheSize = mostrar
sql = "select * from ciec_foro1 where foro=10 order by id desc"
registros.open sql,conexion,1
cant_paginas = registros.PageCount
If pagina_actual > cant_paginas Then pagina_actual = cant_paginas
If pagina_actual < 1 Then pagina_actual = 1
If cant_paginas = 0 Then%>
No se han publicado preguntas
<%Else
registros.AbsolutePage = pagina_actual
registro_mostrado = 0
Do While registro_mostrado < mostrar And Not registros.EOF%>
<%
response.write(datepart("d",registros("fecha")))
mes=datepart("m",registros("fecha"))
select case mes
case 1 mes="enero"
case 2 mes="febrero"
case 3 mes="marzo"
case 4 mes="abril"
case 5 mes="mayo"
case 6 mes="junio"
case 7 mes="julio"
case 8 mes="agosto"
case 9 mes="septiembre"
case 10 mes="octubre"
case 11 mes="noviembre"
case 12 mes="diciembre"
end select
response.write(" de "+mes+" de ")
response.write(datepart("yyyy",registros("fecha")))
%>
<%=registros("hora")%>
<%if registros("mensaje")<>"" then%>
<%end if%>
<%registro_mostrado = registro_mostrado + 1
registros.MoveNext
Loop
end if
registros.close
set registros = Nothing
conexion.close
set conexion = Nothing%>
<%If pagina_actual > 1 Then%>
[<< Anterior]
<%End If
For I = 1 To cant_paginas
If I = pagina_actual Then%>
<%= I %>
<%Else%>
<%= I %>
<%End If
Next
If pagina_actual < cant_paginas Then%>
[Próximo >>]
<%End If%>