|
<%Dim oConn, rs, SQL, azar, cantidad, rsCount, DB_CONNSTRING
Dim nombre, contartr
set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("adsmanager/ads3.mdb")
Set RS2 = Server.CreateObject("ADODB.RecordSet")
RS2.Open "Chome", oConn, 3, 3
total = RS2.RecordCount
SQL="SELECT * FROM CHome ORDER BY clickse desc"
set rs = oConn.Execute(SQL)
randomize
azar = Int (Rnd*(total))
rs.move(azar)
contartr=1
%>
<%For cantidad = 1 to 7 step 1
if contartr = 1 then%>
<%else%>
<%tuar = Replace(rs.fields("Imagen"), "C", "")%>
.jpg" alt="<%response.write(rs.fields("Titulo"))%>">
|
<%response.write(rs.fields("Titulo"))%>
|
| <%=rs.fields("Descripcion")%> |
| ">» Más Información
|
<%if azar = (total -1) then
rs.MoveFirst
azar = 1
else
rs.MoveNext
azar = azar + 1
end if
end if%>
<%contartr = contartr + 1
if contartr = 6 then
contartr = 1
end if
if contartr = 1 then
%>
<%end if
next %>
<%
rs.Close
set rs = nothing
rs2.Close
set rs2 = nothing
oConn.Close
set oConn = nothing%>
|
|
|